简体   繁体   中英

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 eg 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 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM