Totto,
Note you are attempting to WRITE to the registry, not read it!
The Administrator would need to give each user access to specific keys under
HKEY_LOCAL_MACHINE using regedit.exe to allow them to read & write there. I
believe a setup program could also set the permission (possible with a
custom Installer class). I would recommend having the setup program create
the respective keys and set the respective permissions.
Alternatively you may be able to use
System.Windows.Forms.Application.CommonAppDataPath or
System.Windows.Form.Application.CommonAppDataRegis try to store settings for
your app shared by all users.
Hope this helps
Jay
"Totto" <ta*********@norcon.no> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi,
Is possible to read from HKEY_LOCAL_MACHINE whithout beeing loged in as
administrator or power user?
Have tried using the following code, but if loged in as User there is a
security matter.
Dim regKey As RegistryKey = Registry.LocalMachine
Dim strCheckTime As String
regKey = regKey.CreateSubKey(SubKeyOPCProgid)
strCheckTime = regKey.GetValue("CheckTime", strCheckTime)
If it's not possible to read from LocalMachine withourt beeing loged in as
Administrator or power user, where is the right place to store app
settings available to all users ?
Tnx
Totto