Re: writing to registry in vista from guest account



The option I know is to reduce security on this particular hive so a user
can alter it. I am not sure this is wise. Better to put the configuration in
a config file, even if you have to encrypt it.

Another option is releasing the app as a web site or a click once
deployment, where it does not require registry access.

--
Gregory A. Beamer
MVP; MCP: +I, Se, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

*************************************************
| Think outside the box! |
*************************************************
"alexia" <alexia.bee@xxxxxxxxx> wrote in message
news:e5b4c34b-2a9b-4b97-9baa-8c9cf3b2bb4b@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

My application fails to write into registry key. When it runs in user/
guest account.

When I install my application in administrator, the installing process
creates reg key in HKLM.
I compile my application using manifest.
After the installation I create new user/guest account and runs the
application from that account.
The failure is when my application tries to write to the registry I
get the following error:
"Requested registry access is not allowed". I use the following code:
Note that I can read with no problem. My application doesn't fail in
administrator account.
try
{
// I get "Requested registry access is not allowed" error here...
RegistryPermission rm = new RegistryPermission
(RegistryPermissionAccess.AllAccess, TCPRoot);
rm.Demand();
}
catch (Exception e)
{
throw new Exception(e.Message);
}

RegistryKey myRegKey = Registry.LocalMachine;
myRegKey = myRegKey.OpenSubKey("SOFTWARE\\Giant Steps\\SLIP\\TCP",

RegistryKeyPermissionCheck.ReadWriteSubTree,

System.Security.AccessControl.RegistryRights.FullControl);
try
{
myRegKey.SetValue("Subnet", subnet);
}
catch (Exception e)
{
throw new Exception(e.Message);
}

Is there a way to write to a HKLM key which was created in admin
account from user/guest account?

Thanks.


.



Relevant Pages

  • Re: permissions maybe/bought computer, it is still registered in the sellers name
    ... Macromedia Shockwave 10 product on this computer also and am wondering if it is what is not letting XP SP 3 and Flash Player install. ... I am wondering what good it will do me to change the previous owners name in the registry. ... It seems there may be a legality involved here even though the previous owner is not the legal owner now, I mean, even if what I change his name to, it seems the new name should be registered properly for any effect. ... associated user account has been. ...
    (microsoft.public.windowsxp.newusers)
  • Re: permissions maybe/bought computer, it is still registered in the sellers name
    ... I don't understand how the previous owner could have reinstalled XP for me the new owner without opening the sealed cd envelopes. ... Macromedia Shockwave 10 product on this computer also and am wondering if it is what is not letting XP SP 3 and Flash Player install. ... I am wondering what good it will do me to change the previous owners name in the registry. ... associated user account has been. ...
    (microsoft.public.windowsxp.newusers)
  • Re: permissions maybe/bought computer, it is still registered in the sellers name
    ... I am wondering what good it will do me to change the previous owners name in the registry. ... It seems there may be a legality involved here even though the previous owner is not the legal owner now, I mean, even if what I change his name to, it seems the new name should be registered properly for any effect. ... Adobe Flash Player will not install and I see at ... associated user account has been. ...
    (microsoft.public.windowsxp.newusers)
  • Re: registry hacked under XP limited account
    ... >> The thing I want to know is that the registry can be modified ... Running as limited account does VERY LITTLE to stop ... running with administrative rights is a VERY BAD HABIT. ... This tactic will NOT be effective against future malware. ...
    (microsoft.public.security)
  • Re: probably something simple
    ... installing patches so I'll probably use the registry modification since I ... > limited user account(s) to an admin account in Control Panel / User ... > install the necessary files and create the keys in the registry that it ... When your limited user wants to play a game that requires Administrator ...
    (microsoft.public.windowsxp.games)

Loading