Re: Registry Permissions Error
From: Scott Adams (scott.adams@daishowaamerica.com)
Date: 02/20/03
- Next message: Mark K: "Re: LogonUser()"
- Previous message: Michel Gallant (MVP): "Re: Registry Permissions Error"
- In reply to: Michel Gallant (MVP): "Re: Registry Permissions Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Scott Adams" <scott.adams@daishowaamerica.com> Date: Thu, 20 Feb 2003 10:35:01 -0800
Thanks for the article. I changed my code so that I use HKCU instead of
HKLM. I was not aware that users had full control in HKCU and limited access
in HKLM.
Scott
"Michel Gallant (MVP)" <neutron@istar.ca> wrote in message
news:3E5513B0.63DE409@istar.ca...
> You are running into user permissions to access the registry. This level
of
> security is "below" .net so applies to it also.
> All settings are discussed in detail in W2k ResKit herre:
>
http://www.microsoft.com/windows2000/techinfo/reskit/en-us/default.asp?url=/
windows2000/techinfo/reskit/en-us/prork/prdd_sec_njrp.asp
>
> Note sections on HKCU versus HKLM permissions for various users.
>
> - Michel Gallant
> MVP Security
> http://www.jensign.com
>
>
> Scott Adams wrote:
>
> > Hello.
> >
> > I have created a Windows application with VB.NET that depends heavily on
> > writing to, reading from, and creating keys in the registry. All is well
on
> > my dev box which runs Win2K pro (on an Admin account). When I install
the
> > app on a user's machine who is not an Administrator (restricted security
> > policy), the user is not able to create keys in the registry. (The same
is
> > true if the user manually tries to open regedit.exe and tries to create
a
> > key.) I have researched heavily into this issue, yet the answer evades
me.
> > Can someone help please? Thanks.
> >
> > Sample code:
> > Public Sub SampleSub
> > Dim regKey as Microsoft.Win32.RegistryKey = _
> >
Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\MyApp",
> > True)
> > regKey.SetValue("MyValue","MyData")
> > regKey.Close
> > End Sub
> >
> > Error message is from "mscorlib"; "Requested registry access is not
> > allowed."
> >
> > Scott Adams
> > AdamsSoft Co.
>
- Next message: Mark K: "Re: LogonUser()"
- Previous message: Michel Gallant (MVP): "Re: Registry Permissions Error"
- In reply to: Michel Gallant (MVP): "Re: Registry Permissions Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|