Registry
-
Hi Friends An error "Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' is denied." occured in below code. How can i solve this problem
Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "hello", "c:\\hello.exe");
thanks in advance
-kk.tvm-
-
Hi Friends An error "Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' is denied." occured in below code. How can i solve this problem
Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", "hello", "c:\\hello.exe");
thanks in advance
-kk.tvm-
A non-administrative user does not have write access to HKEY_LOCAL_MACHINE. What is the purpose of your project? Would it be ok to put a link into the user's startup folder? Or are you trying to create a Windows service? Then its installation routine would be run in administrative context and can write that key.
-
A non-administrative user does not have write access to HKEY_LOCAL_MACHINE. What is the purpose of your project? Would it be ok to put a link into the user's startup folder? Or are you trying to create a Windows service? Then its installation routine would be run in administrative context and can write that key.