SystemRoot: XP vs VISTA



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


.



Relevant Pages

  • Re: Generating Help Files
    ... Create a Simple Context-Sensitive HTML Help File ... This posting is provided "AS IS" with no warranties, ... Purchase VFP8 here: ... > How do I generate a help system in VFP 8.0? ...
    (microsoft.public.fox.programmer.exchange)
  • Script Errors From FP03 HTML Help System
    ... I installed FrontPage 2003 a few days ago and eventually asked for context ... references, broken page references, and missing graphics. ... Maybe the HTML Help .dll's or .ocx are ... Go to http://home.comcast.net/~bimmersmith and take a look at Help System ...
    (microsoft.public.frontpage.client)
  • Re: GUI Interfaces
    ... it that it did not pertain to my system. ... it starts the new win help system and just says that WinHlp32.exe is ... Adding HTML Help to Delphi apps is a piece of cake. ...
    (alt.comp.lang.borland-delphi)
  • VFP8, Frontpage and Help 1.4SDK
    ... I download this from MS and have some questions. ... Can I use Frontpage to develop a help system for my application? ... I don't much HTML and the MS HTML Help SDK requires this. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: script error in help system
    ... I cleaned the TIF directory and deleted the hh.dat file ... My help system is now working perfectly. ... >can cause HTML Help files to misbehave. ...
    (microsoft.public.win2000.file_system)