Re: SystemRoot: XP vs VISTA
- From: Rob Kennedy <me3@xxxxxxxxxxx>
- Date: Fri, 09 Feb 2007 18:32:23 -0600
Tom de Neef wrote:
Thank you. ExpandEnvironmentStrings works.
Under XP, the data type is REG_SZ - 'C:\WINDOWS\System32\hhctrl.ocx'
Under Vista, it is REG_EXPAND_SZ - '%SystemRoot%\System32\hhctrl.ocx'
So, it should have been expanded. I do that now programmatically.
Yep. Delphi is ignoring the difference in types. It's up for discussion as to whether Delphi _should_ automatically expand the value.
If TRegistry.GetDataType returns rdExpandString, then call ExpandEnvironmentStrings on the string value. If you use the return value from GetDataType, then you don't need to rely on knowing the OS version or inspecting the contents of string (looking for % characters).
--
Rob
.
- References:
- SystemRoot: XP vs VISTA
- From: Tom de Neef
- Re: SystemRoot: XP vs VISTA
- From: Rob Kennedy
- Re: SystemRoot: XP vs VISTA
- From: Tom de Neef
- SystemRoot: XP vs VISTA
- Prev by Date: Re: Problem using With statement
- Next by Date: Re: Problem using With statement
- Previous by thread: Re: SystemRoot: XP vs VISTA
- Next by thread: Re: Hello
- Index(es):
Relevant Pages
|