Alstom
6th July 2007 04:34 UTC
Writing Registry with Password
Hi,
I had a problem here. How do we write a registry with a password?
Example:
WriteRegStr HKLM "SYSTEM\ControlSet001\Services\$RegistryName" "ObjectName" "Administrator"
I am able to write to the registry with Adminisrator profile but how do i set the password using NSIS, Password="System"?
Can I add the password to the registry?
I had check in the registry, there is a folder with a key, name="security", type="REG_BINARY", Data=a lot of numbers.
I think this is the password installed in the registry.
Milliom thanks if you could help!!!
CancerFace
6th July 2007 08:52 UTC
You are trying to create entries for a service, something that can be done using differnet methods. The security value that you see is not a password and is system specific, it is created when you create a new service.
The key you are looking at is also not correct as it reflects what can be found in HKLM\System\CurrentControlSet\Services\.... There may also be entries under HKLM\System\CurrentControlSet\Enum\Root\LEGACY_... depending on the type of service created. It is best not make those entries by hand but to use some API function instead.
Try the command line tool sc.exe that comes with windows. A simpe
sc.exe create /?
will give you the syntax. It supports specifying an account and password for the new service.
CF