简体   繁体   中英

Java Advapi32Util update registry key

I need to update a registry key values and I am trying to use Advapi32Util (JNA API).

Is there a method to update a key value. All I can find is create, write, or delete?

Does this mean, I have to delete the key and recreate it every time I want to update the values?

There are a whole set of registrySet*Value() methods, for example:

... and array variants of the above. You should, of course, check whether the key exists and create it if it doesn't. The Util handles opening and closing the key for you, otherwise you'd want to use the Windows API RegOpenKeyEx and RegCloseKey methods mapped in Advapi32 .

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