registry can not updated

Registry can not be updated

I have a program which updates the Registry so that a line is added to the context menu of a jpg file. However, the update fails.
RegCreateKeyEx returns the error code 5 (ERROR_ACCESS_DENIED)
With Regedit there is no problem, so it is not a matter of privileges. -- José

Hi Jos?,
Actually, it is a permissions issue. The program is likely not running with elevated privileges, so it cannot write the key.
-- Best of Luck,
Rick Rogers, aka "Nutcase" - Microsoft MVP http://mvp.support.microsoft.com/ Windows help - www.rickrogers.org
"Jos?" wrote in message

I have a program which updates the Registry so that a line is added to the context menu of a jpg file. However, the update fails.
RegCreateKeyEx returns the error code 5 (ERROR_ACCESS_DENIED)
With Regedit there is no problem, so it is not a matter of privileges. -- José

On Fri, 23 Jun 2006 06:28:27 -0400, "Rick Rogers" wrote in microsoft.public.windows.vista.general:

Actually, it is a permissions issue. The program is likely not running with elevated privileges, so it cannot write the key.

I ran it under the Administrator account. To be precise: the first account I created when the system was installed. Besides, with Regedit it wasn't a problem to modify the registry. -- José

Conor is correct. In Vista an administrator runs as a user but can give permission as an administrator to perform an action that changes the computer. That sets up a security model where no script or program can execute without the user's awareness. That was the problem with running as administrator in XP. Malware could change something in the computer because it could inherit the administrator's permissions without his knowledge.
"José" wrote in message

On Fri, 23 Jun 2006 06:28:27 -0400, "Rick Rogers" <rick@mvps.org wrote in microsoft.public.windows.vista.general:
Actually, it is a permissions issue. The program is likely not running with elevated privileges, so it cannot write the key.
I ran it under the Administrator account. To be precise: the first account I created when the system was installed. Besides, with Regedit it wasn't a problem to modify the registry. -- José

Conor?
-- Best of Luck,
Rick Rogers, aka "Nutcase" - Microsoft MVP http://mvp.support.microsoft.com/ Windows help - www.rickrogers.org
"Colin Barnhorst" wrote in message

Conor is correct. In Vista an administrator runs as a user but can give permission as an administrator to perform an action that changes the computer. That sets up a security model where no script or program can execute without the user's awareness. That was the problem with running as administrator in XP. Malware could change something in the computer because it could inherit the administrator's permissions without his knowledge.
"José" wrote in message On Fri, 23 Jun 2006 06:28:27 -0400, "Rick Rogers" <rick@mvps.org wrote in microsoft.public.windows.vista.general:
Actually, it is a permissions issue. The program is likely not running with elevated privileges, so it cannot write the key.
I
ran it under the Administrator account. To be precise: the first account I created when the system was installed. Besides, with Regedit it wasn't a problem to modify the registry. -- José

Windows Vista

Topic:


Nick: