Article View: borland.public.cppbuilder.nativeapi
Article #9648Re: Accessing Registry
From: Brian Lonnon
Date: Sun, 27 Jun 2004 09:12
Date: Sun, 27 Jun 2004 09:12
50 lines
2534 bytes
2534 bytes
Hmmm, Thanks for the reply Is there no way to grant and then remove the right? I have done this before using adjusttokenprivielege? Brian "Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message news:40de0478$1@newsgroups.borland.com... > > "Brian Lonnon" <lonnon@screaming.net> wrote in message > news:40dde673$1@newsgroups.borland.com... > > > How can I allow ordinary users to write to keys in HKEY_LOCAL_MACHINE? > > You probably can't, they wouldn't have the necessary access rights > available, unless you use REGEDT32.EXE to adjust the access rights on the > individual keys themselves. > > > I want my program to set NukeOnDelete > > > in(HKEY_LOCAL_MACHINE\Software\Microsoft\windows\currentversion\explorer\bit > > bucket) to 1 at startup and reset it to 0 on exit. > > The only ways for a non-admin to do that is if the key's security rights are > changed via REGEDT32.EXE. Otherwise, you need admin rights. For a > non-admin to gain admin rights without reconfiguring the system, you would > have to make a separate service which itself runs under the SYSTEM (and thus > an admin) account. Then the program running under the non-admin user could > communicate with the service running under an admin account, and have the > service behave on the program's behalf. > > > Logged on as Administrator, there is no problem. Logged > > on as a user without admin rights, any attempt to write to > > the key fails. > > As well it should. Non-admin users don't have writing privileges to HKLM by > default. > > > Gambit > >
Technical Details
Message-ID:
<40de8f93$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40dde673$1@newsgroups.borland.com> <40de0478$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d95394da9c6bddf4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Brian Lonnon" <lonnon@screaming.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <40dde673$1@newsgroups.borland.com> <40de0478$1@newsgroups.borland.com> Subject: Re: Accessing Registry Date: Sun, 27 Jun 2004 10:12:39 +0100 Lines: 52 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 80.41.233.200 Message-ID: <40de8f93$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088327571 80.41.233.200 (27 Jun 2004 02:12:51 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail