0

I am somewhat new to Registry Keys in Windows. What I want to do is add a registry key ONCE that will take effect on the local SYSTEM user (for as long as my program is installed). This registry key will need to be added through a batch file while logged on as a regular user (not the SYSTEM user). What I am doing exactly is running a batch script that creates a windows service. This service is running as the local system user. The service is trying to do something that requires a registry key to be set. I tried manually setting the registry key in HKEY_LOCAL_MACHINE but I am still hitting the roadblock when my service is run. Is this the correct place to change registry keys so that the local system account will see them? Any knowledge on the subject would be greatly appreciated!

user972276
  • 2,973
  • 9
  • 33
  • 46
  • The local system account should be able to see registry keys in HKLM. I think you need admin privileges to write anything to HKLM, are you running the batch file as an admin? – Steve Jun 03 '13 at 15:17
  • Right now I just manually added the reg key using regedit. I was able to add it just fine with no errors and when I restart regedit, the reg key is still there. I just wanted to make sure I was adding it in the right place. If I am adding it in the right place, I guess the other option is I am not adding/changing the correct reg keys which is a different issue. – user972276 Jun 03 '13 at 15:31

0 Answers0