Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry

Status
Not open for further replies.

c567591

MIS
Aug 12, 2002
67
US
I need to use the registry to store settings for my software. The settings are setup in the installation program.

We have been using HKey_Local_Machine in the past, but when installing in a corporate environment where the user does not have admin rights to the machine, we get errors writing to it.

If I use HKey_Current_User, then it will work ok, but if a different user logs in, then the registry settings are not there for them.
How can I do this without having to reinstall for every user. Or at least having to import regisrty settings for every user?

We can't assume an admin can be available to install all the time.

I've tried google searches but get overwealmed by too many sites that don't have info on what I am trying to do. Way too many sites talking about the registry...

What are my options here?
 
As far as I know, you can't do that. It's security key point: if a user has no proper rights on the machine, it can't install new programs on it (it's OK;)...
 
Somethimes Admins rights not protected Kernel32.dll for Guest users on Windows, and other way is to use registry by other .dll's but it's more harder to create, I tested some years before it's work for me on WinXP with Guest user if I not protected registry by using it from other system .dll's. But otherway if protected all for Guest user system .dll's for accessing registry's, so no possible to create registry where you want.
 
I think the installer (which is run under admin rights) should write to HKLM. On first running app in each new user the HKLM key should be read and copied to HKCU. The app will now use the local copy to that current user forthwith. On logging out and logging in with a different user is that user doesnt have a key in HKCU then again copy whats needed from HKLM. Any user can read the HKLM registry and can write to their own HKCU key.You can check if you need to set up HKCU or use it just by checking for the existence of your key there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top