Article View: borland.public.cppbuilder.nativeapi
Article #9647Re: Accessing Registry
From: Remy Lebeau (TeamB)
Date: Sat, 26 Jun 2004 23:15
Date: Sat, 26 Jun 2004 23:15
32 lines
2196 bytes
2196 bytes
"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:
<40de0478$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!npeer.de.kpn-eurorings.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>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d95394da9c6bddf4 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40dde673$1@newsgroups.borland.com> Subject: Re: Accessing Registry Date: Sat, 26 Jun 2004 16:15:43 -0700 Lines: 34 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: 68.169.168.124 Message-ID: <40de0478$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1088291960 68.169.168.124 (26 Jun 2004 16:19:20 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail