🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Registry and Users

#9042
From: Remy Lebeau (TeamB)
Date: Fri, 06 Aug 2004 17:51
46 lines
2889 bytes
"McKool" <kenethw@peak-system.com> wrote in message
news:4113521d$1@newsgroups.borland.com...

> but if the user is not an administrator will not
> be able to change its values....

Yes, you can.  Admin rights apply to HKEY_LOCAL_MACHINE itself and various
system keys underneath it.  If you create your own subkey under the
"Software" subkey, you can access your own values.  Worse case scenerio,
just have the Admin use REGEDT32 to adjust the access rights to give
non-admin users access to just that key.

> I want to save in the registry the windows position,
> height and width.

That sounds like a per-user type of settings, so why do you want them global
to all users?

> Than, i suppost that i only have to create for each user a copy
> of the Local Mchine keys to Current user (when the keys in
> the HKEY_CURRENT_USER doesn't exist) and after that
> use only those keys of the current user.

If all you are trying to do is set up default values for all users and then
let each user customize the values afterwards, then why not just have the
program itself apply its own defaults to itself at program startup if the
HKEY_CURRENT_USER values don't exist yet, and then always save the current
values to HKEY_CURRENT_USER at shutdown?  That way, your installer doesn't
have to mess with the registry at all, and the Registry values will be set
up per user each time a user runs the program for the first time.

> I didn't made that before because after that, the unistall program
> will not delete the information in the  HKEY_CURRENT_USER.

Just configure the installer to always remove the registry values whether
they exist or not.  If they don't exist, the uninstaller will just ignore it
and move on either way.

> Is that too bad, leave trash in the registry after a program is no
> more in a machine, or it is a normal procedure?.

Uninstallers should remove as much as possible.


Gambit
Technical Details
Message-ID: <4113c501$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41132959@newsgroups.borland.com> <41132cdf$1@newsgroups.borland.com> <4113521d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,87a5bb405e46bf5a
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: <41132959@newsgroups.borland.com> <41132cdf$1@newsgroups.borland.com> <4113521d$1@newsgroups.borland.com>
Subject: Re: Registry and Users
Date: Fri, 6 Aug 2004 10:51:55 -0700
Lines: 48
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.69.17.41
Message-ID: <4113c501$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1091814657 68.69.17.41 (6 Aug 2004 10:50:57 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail