Writing to HKEY_LOCAL_MACHINE fails.
-
Hi, I am using VS 2005 on vista platform. I want to set a registry entry located in HKEY_LOCAL_MACHINE. The following function fails. RegOpenKeyEx(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Windows", 0, KEY_SET_VALUE, &hKey); The return value of the above API is ERROR_ACCESS_DENIED. I have logged in as an normal user without any admin privilages. I know this funciton is failing because I donot have the privilage to perform any write operation. How do I get around this problem without having Admin privileges? I want to modify registry value located in HKEY_LOCAL_MACHINE. Could anybody help me with this issue?
-
Hi, I am using VS 2005 on vista platform. I want to set a registry entry located in HKEY_LOCAL_MACHINE. The following function fails. RegOpenKeyEx(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Windows", 0, KEY_SET_VALUE, &hKey); The return value of the above API is ERROR_ACCESS_DENIED. I have logged in as an normal user without any admin privilages. I know this funciton is failing because I donot have the privilage to perform any write operation. How do I get around this problem without having Admin privileges? I want to modify registry value located in HKEY_LOCAL_MACHINE. Could anybody help me with this issue?
-
Hi, I am using VS 2005 on vista platform. I want to set a registry entry located in HKEY_LOCAL_MACHINE. The following function fails. RegOpenKeyEx(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Windows", 0, KEY_SET_VALUE, &hKey); The return value of the above API is ERROR_ACCESS_DENIED. I have logged in as an normal user without any admin privilages. I know this funciton is failing because I donot have the privilage to perform any write operation. How do I get around this problem without having Admin privileges? I want to modify registry value located in HKEY_LOCAL_MACHINE. Could anybody help me with this issue?
U will have to execute ur application as "Run as Adminstrator". Sachin
-
Hi, I am using VS 2005 on vista platform. I want to set a registry entry located in HKEY_LOCAL_MACHINE. The following function fails. RegOpenKeyEx(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Windows", 0, KEY_SET_VALUE, &hKey); The return value of the above API is ERROR_ACCESS_DENIED. I have logged in as an normal user without any admin privilages. I know this funciton is failing because I donot have the privilage to perform any write operation. How do I get around this problem without having Admin privileges? I want to modify registry value located in HKEY_LOCAL_MACHINE. Could anybody help me with this issue?
Marimuthu.pesit wrote:
How do I get around this problem without having Admin privileges?
Temporarily turn off UAC.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Hi, I am using VS 2005 on vista platform. I want to set a registry entry located in HKEY_LOCAL_MACHINE. The following function fails. RegOpenKeyEx(HKEY_LOCAL_MACHINE, "System\\CurrentControlSet\\Control\\Windows", 0, KEY_SET_VALUE, &hKey); The return value of the above API is ERROR_ACCESS_DENIED. I have logged in as an normal user without any admin privilages. I know this funciton is failing because I donot have the privilage to perform any write operation. How do I get around this problem without having Admin privileges? I want to modify registry value located in HKEY_LOCAL_MACHINE. Could anybody help me with this issue?
Normaly, you set the needed Keys in HKEY_LOCAL_MACHINE at installation time. Programms write deviations from the defaults to HKEY_CURRENT_USER. That is writable without privileges.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words