[英]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).
我从1.答案中选择了一段代码,并给出了很好的例子,可以从Windows注册表(WR)中读取一些值。 Can anyone give me a good example please to write an entry (valueName and Value) in WR?
谁能给我一个很好的例子,请在WR中写一个条目(valueName和Value)? 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! 我对Java不熟悉,这就是为什么没有示例我很难理解它:(主键是
HKEY_LOCAL_MACHINE
,子键是Software\\\\Wow6432Node\\\\mySoft
。我要编写的valueName和值是: myPwd
和a
,谢谢!
Please refer back to the same link here first answer to use the provided class WinRegistry, and then you can use its function writeStringValue
请先返回到同一链接,然后在此处首先答案以使用提供的类WinRegistry,然后可以使用其功能
writeStringValue
For example, in your case: 例如,在您的情况下:
WinRegistry.writeStringValue( WinRegistry.HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\mySoft", "myPwd", "a" );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.