Bully WiiPlaza
Bully WiiPlaza

Reputation: 472

How To Export A Windows Registry File Using Java

How can one export and import a .reg file which contains all keys and subfolders just like the registry editor export function?

I've seen various suggestions and libraries e.g. here.

They only read / write keys by name which doesn't help with many or varying entries. Can it be done using the jna library?

Upvotes: 1

Views: 722

Answers (1)

jcragun
jcragun

Reputation: 2198

You could have it kick off a batch file as indicated here.

set rkey=HKEY_CURRENT_USER\Control Panel\Mouse
REG EXPORT "%rkey%" "C:\keys.reg"
REG IMPORT "%rkey%" newkeys.reg

Upvotes: 1

Related Questions