🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Vista and Writing to the Registry

#2092
From: Eelke
Date: Wed, 02 May 2007 10:37
22 lines
2044 bytes
Mark Jacobs schreef:
> I have an application that cannot write to the registry unless I set its 
> properties, compatibility to run as admin. After doing this, each time 
> the PC is restarted, and the app is set launch at boot up, but I get a 
> UAC message asking me if I'm sure I want to allow my app to run with 
> admin privileges. Is there any way programmatically to avoid this prompt 
> each time? Is there a better way of ensuring an app can write to the 
> registry under Vista? TIA,

You would probably have this problem to on windows 2000 with standard users.

Yes use registry keys to which you do have write access as a normal 
user. The keys under HKEY_LOCAL_MACHINE are generally readonly for users 
so store as much as possible under HKEY_CURRENT_USER instead.

If you must have write access to keys under HKEY_LOCAL_MACHINE it is 
possible to create keys with different security settings. But I never 
tried it myself as using HKEY_CURRENT_USER has aalways been sufficient 
for me. Ofcourse these keys should be created when running as 
administrator so it might be a good idea to create them during installation.

Eelke
Technical Details
Message-ID: <463869f2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4638664c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b61a7950d3d9bb4a
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 02 May 2007 12:37:55 +0200
From: Eelke <e.klein@remove.mplussoftware.nl>
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Vista and Writing to the Registry
References: <4638664c@newsgroups.borland.com>
In-Reply-To: <4638664c@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 195.241.133.37
Message-ID: <463869f2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178102258 195.241.133.37 (2 May 2007 03:37:38 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail