PDA

View Full Version : String to the Registry



NewsArchive
04-25-2008, 01:33 AM
Everything I know about the registry wouldn't fill the subject line of this
message but what I need to know is; when I write to the registry to store
install paths and such, which primary key should I use? HKEY_LOCAL_MACHINE
or HKEY_CURRENT_USER?

Should I anticipate that in some environments the user may not be able to
write to LOCAL_MACHINE?

I appreciate the help.

Kingsley Klosson

NewsArchive
04-25-2008, 01:34 AM
Hi Kingsley,

>Everything I know about the registry wouldn't fill the subject line of this
>message but what I need to know is; when I write to the registry to store
>install paths and such, which primary key should I use? HKEY_LOCAL_MACHINE
>or HKEY_CURRENT_USER?
>
>Should I anticipate that in some environments the user may not be able to
>write to LOCAL_MACHINE?

Correct. Under Vista using UAC and running a program with asInvoker
manifest (most programs use that) you do not have write privilege to
the HKEY_LOCAL_MACHINE. If your program is run elevated as
requireAdmin (most installs run that way to be able to install files
into "Program Files"), you can write to HKEY_LOCAL_MACHINE. You can,
however, READ from both keys under Vista without problems (using
GetReg in Clarion)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php