Re: detecting when the registry is locked (e.g. limited users with WindowsXP)
From: Peter Below (TeamB) (100113.1101_at_compuXXserve.com)
Date: 12/06/03
- Next message: Kurt Barthelmess: "Re: Binary copy"
- Previous message: Peter Below (TeamB): "Re: SetProcessAffinityMask"
- In reply to: chris_at_mricro.com: "detecting when the registry is locked (e.g. limited users with WindowsXP)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 06 Dec 2003 13:32:13 +0100
In article <oprzpz1jhry9hwxn@localhost>, wrote:
> I have always had my software attempt to create file associations at
> startup. Using there, a user can simply click on a '*.img' icon and it
> will load the appropriate software (e.g. my free MRIcro brain viewing
> software).
That is very intrusive, you should at least *ask* before you make such wide-ranging
modifications to a users system. He may prefer to use another program for this file
type, you know.
> However, with WindowsXp, it appears that administrators can severly limit
> the ability of standard users to access the registry. Instead of simply
> saying that the system can not generate a new assoiciation, the
> application crashes.
That is only a problem of insufficient error handling on your part.
> I know that the code below is the culprit, because if
> I deactivate this code the program executes normally.
Your problem is that you are using a TRegInifile. It always opens keys with
KEY_ALL_ACCESS, and that is what is most likely to fail on more restricted systems.
Use a TRegistry object instead, it allows you to configure the access mode, and
create keys with (KEY_READ or KEY_WRITE).
-- Peter Below (TeamB) Use the newsgroup archives : http://www.mers.com/searchsite.html http://www.tamaracka.com/search.htm http://groups.google.com http://www.prolix.be
- Next message: Kurt Barthelmess: "Re: Binary copy"
- Previous message: Peter Below (TeamB): "Re: SetProcessAffinityMask"
- In reply to: chris_at_mricro.com: "detecting when the registry is locked (e.g. limited users with WindowsXP)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]