简体   繁体   中英

How to write an entry (valueName and value) in Windows Registry

Similar question was already ask here and there're a lot of good answers. I choosed the piece of code from the 1. answer and with given good example could read some value from Windows Registry (WR). Can anyone give me a good example please to write an entry (valueName and Value) in WR? I'm not familiar with Java and that's why it's a little complicated for me to understand it without example:( The main Key is HKEY_LOCAL_MACHINE , Subkey is Software\\\\Wow6432Node\\\\mySoft . The valueName and value that I want to write are: myPwd and a . Thanks!

Please refer back to the same link here first answer to use the provided class WinRegistry, and then you can use its function writeStringValue

For example, in your case:

WinRegistry.writeStringValue( WinRegistry.HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\mySoft", "myPwd", "a" );

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