I have found the first reply on this question: Read/write to Windows registry using Java
I have copied the class from the reply and used it.
This sample code works:
String value = WinRegistry.readString (
WinRegistry.HKEY_LOCAL_MACHINE, //HKEY
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", //Key
"ProductName"); //ValueName
System.out.println("Windows Distribution = " + value);
However, when I try to run:
String value = WinRegistry.readString(
WinRegistry.HKEY_LOCAL_MACHINE, //HKEY
"SYSTEM\\CurrentControlSet\\Services\\LanmanWorkstation\\Parameters", //Key
"EnableSecuritySignature"); //ValueName
System.out.println(value);
I get null.
screen from my registry editor of the component I have to read
I have to read the date value of EnableSecuritySignature.
Does someone know what could be the problem? Sorry for lack of details in my description, I am in hurry))