SystemRoot: XP vs VISTA
- From: "Tom de Neef" <tdeneef@xxxxxxxx>
- Date: Thu, 8 Feb 2007 22:42:24 +0100
In a borrowed piece of code (for html help) I have
Reg.RootKey := HKEY_CLASSES_ROOT;
if Reg.OpenKeyReadOnly(hhPathRegKey)
then result := Reg.ReadString('');
Under XP this result in 'C:\WINDOWS\System32\hhctrl.ocx'
My application didn't open the help system under Vista because the same code
then results in
'%SystemRoot%\System32\hhctrl.ocx'
By searching with regedit I've discovered that SystemRoot is defined in
'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion'
With StringReplace I now substitute the parameter.
It occurs to me that this problem may appear in other places. Is there a
standard way of replacing windows parameters in the paths found in the
registry?
Tom
.
- Follow-Ups:
- Re: SystemRoot: XP vs VISTA
- From: Rob Kennedy
- Re: SystemRoot: XP vs VISTA
- From: Jamie
- Re: SystemRoot: XP vs VISTA
- Prev by Date: Re: How to trap this event
- Next by Date: Re: Problem using With statement
- Previous by thread: How to trap this event
- Next by thread: Re: SystemRoot: XP vs VISTA
- Index(es):
Relevant Pages
|