🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11945

Re: Registry Editing & Security

#11945
From: Alan Bellingham
Date: Thu, 08 Jan 2004 15:23
32 lines
2400 bytes
"John" <jhgfdjgs@jkbfjh.com> wrote:

>Is there absolutely no way for me to programatically edit/create/delete keys
>the HKEY_LOCAL_MACHINE branch if the user has only "Users Group"
>permissions?

I hope not.

>By default - this group cannot edit any branch but the HKEY_CURRENT_USER
>branch - and I really need to be able to bypass this security somehow...
>
>Is it possible?

There's a reason for this - it's called security. You don't want
untrusted applications (viruses, worms, etc.) breaking those parts of
the registry that the PC relies upon to be consistent[*].

If you only need to create/edit/modify these values during installation,
then you may ask the user to install the program as the Supervisor user.

If you need to edit/modify these values during normal execution, then in
addition, get your installer to change the permissions of the relevant
keys. This is possible though I've not done it myself - if you look at
RegCreateKeyEx(), you'll see a SECURITY_ATTRIBUTES field.

Alan Bellingham
[*] I've seen machines where Windows won't even boot as a result of
registry corruption. This is very bad news indeed.
-- 
Team Mongolian Wok
<url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions
<url:http://www.borland.com/newsgroups/netiquette.html>      netiquette
Technical Details
Message-ID: <9osqvvor0r84620oj21h4fug377qbli3nj@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn11feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ffd6729$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9e80007e230535d8
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-08 07:37:50 PST
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Registry Editing & Security
Date: Thu, 08 Jan 2004 15:23:50 +0000
Reply-To: alanb@episys.com
Message-ID: <9osqvvor0r84620oj21h4fug377qbli3nj@4ax.com>
References: <3ffd6729$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.129.251.130
X-Trace: newsgroups.borland.com 1073575429 193.129.251.130 (8 Jan 2004 07:23:49 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn11feed!worldnet.att.net!216.166.71.14!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail