Click to See Complete Forum and Search --> : Admin. rights and registry


c357323
June 5th, 2004, 01:35 AM
Hello all,

There is a program that stores a value once in the registry in HKLM and will not run unless this same value is present everytime it executes.
The problem is windows-xp doesn't seem to accept changes in registry at HKLM unless a user with administrator rights is logged at that time.

Since I need to distribute that program as a part of my project, I thought of writing my own code to add that registry value before calling that program.
But I need a way to override this limitation to change the registry at HKLM if a regular user (with no admin. rights) is logged.

Can anyone help in this issue?

Thanks
------
c357

Marc G
June 5th, 2004, 02:54 AM
No!
On a normal installation, an ordinary user cannot write to HKLM, only read from it.
You should not mess with these permissions from inside your program, though as a normal user you wouldn't even be able to mess with these permissions.

You can let your setup program create the required key in HKLM and force the setup program to be run as administrator.