Thanks Thomas Kux who sent in this H2Reg INNO Installer script used by wxwindows. Inno does not know the VS .NET language or version so Thomas installs to multiple targets of: - VS .NET 7.0, VS .NET 7.1, English (1033) and German (1031) languages (clever :-). Thomas also uses {reg:HKLM\SOFTWARE\Microsoft\VisualStudio\7.1,InstallDir|}HTML\XMLLinks\1033 which is the recommended method of finding the VS .NET Environment Dir and Link group path. See also "Q. How do I find the Path to the VS .NET Folders?" here. INNO Install ScriptThe highlighted sections show H2Reg registration/unregistration. Discussion:
001 ; H2Reg Setup Script used by the INNO Free Setup Program 002 ; INNO Web Site - http://www.jrsoftware.org/isinfo.htm 003 004 [Setup] 005 ; Install Text seen everywhere 006 AppName=wxWindows Help 007 AppVerName=wxWindows Help 2.4.1 008 AppVersion=2.4.1 009 010 DefaultDirName={%WXDIR}\docs\h2help 011 DefaultGroupName=wxWindows 012 AppCopyright=Copyright © 1992-2003 Julian Smart et al. 013 DisableFinishedPage=no 014 DisableStartupPrompt=yes 015 AllowNoIcons=yes 016 ; EnableDirDoesntExistWarning=yes 017 018 ; Seen on Add/Remove and Uninstall dialog 019 UninstallDisplayName=wxWindows Help by http://www.wxwindows.org 020 AppPublisher=The wxWindows Team 021 AppPublisherURL=http://www.wxwindows.org 022 AppUpdatesURL=http://www.wxwindows.org 023 024 ; Text not seen 025 AppId=wxWindowsHelp 026 027 ; Warming: mutex name is case sensitive 028 AppMutex=wxWindowsHelpMutex 029 030 Compression=zip/9 031 OutputBaseFilename=wxWindowsHelp 032 AdminPrivilegesRequired=yes 033 LicenseFile=licence.txt 034 CreateUninstallRegKey=yes 035 UninstallDisplayIcon={app}\wxwin.ico 036 037 BackColorDirection=toptobottom 038 BackColor=clBlue 039 BackColor2=clBlack 040 WindowVisible=no 041 042 ; Run H2Reg.exe -r with Script file to Register all H2 Documentation 043 [Run] 044 Filename: "{app}\H2Reg.exe"; Description: "Registering wxWindows Documentation"; Parameters: "-r cmdfile={app}\H2Reg_Cmd.ini"; Flags: skipifsilent; StatusMsg: "Registering Help Files" 045 Filename: "{app}\readme.txt"; Description: "Displaying Readme.txt"; Tasks: showreadme 046 Filename: "{cf}\Microsoft Shared\Help\dexplore.exe"; Parameters: "/helpcol ms-help://wxWindows"; Tasks: showhelp; Description: "Displaying wxWindows 2.4.1 Help"; 047 048 ; Run H2Reg.exe -u with Script file to Unregister all H2 Documentation 049 [UninstallRun] 050 Filename: "{app}\H2Reg.exe"; Parameters: "-u cmdfile={app}\H2Reg_Cmd.ini" 051 052 ; Get rid of the H2Reg log file if it exists 053 [UninstallDelete] 054 Type: files; Name: "{app}\H2Reg_Log.txt" 055 Type: dirifempty; Name: "{app}" 056 057 [Files] 058 Source: "H2Reg.exe"; DestDir: "{app}"; Flags: ignoreversion; 059 Source: "H2Reg.ini"; DestDir: "{app}"; Flags: ignoreversion; 060 Source: "readme.txt"; DestDir: "{app}"; Flags: ignoreversion; 061 Source: "licence.txt"; DestDir: "{app}"; Flags: ignoreversion; 062 Source: "wxMaster.HxA"; DestDir: "{app}"; Flags: ignoreversion; 063 Source: "wxMaster.HxC"; DestDir: "{app}"; Flags: ignoreversion; 064 Source: "wxMaster.HxT"; DestDir: "{app}"; Flags: ignoreversion; 065 Source: "wxMaster_A.HxK"; DestDir: "{app}"; Flags: ignoreversion; 066 Source: "wxMaster_F.HxK"; DestDir: "{app}"; Flags: ignoreversion; 067 Source: "wxMaster_K.HxK"; DestDir: "{app}"; Flags: ignoreversion; 068 Source: "wxMasterNamedURL.HxK"; DestDir: "{app}"; Flags: ignoreversion; 069 Source: "wxWindows.HxS"; DestDir: "{app}"; Flags: ignoreversion; 070 Source: "H2Reg_cmd.ini"; DestDir: "{app}"; Flags: ignoreversion; 071 Source: "wxWindows.xml"; DestDir: "{app}"; Flags: ignoreversion; 072 Source: "wxWindows.xml"; DestDir: "{reg:HKLM\SOFTWARE\Microsoft\VisualStudio\7.1,InstallDir|}HTML\XMLLinks\1033"; Flags: ignoreversion; 073 Source: "wxWindows.xml"; DestDir: "{reg:HKLM\SOFTWARE\Microsoft\VisualStudio\7.1,InstallDir|}HTML\XMLLinks\1031"; Flags: ignoreversion; 074 Source: "wxWindows.xml"; DestDir: "{reg:HKLM\SOFTWARE\Microsoft\VisualStudio\7.0,InstallDir|}HTML\XMLLinks\1033"; Flags: ignoreversion; 075 Source: "wxWindows.xml"; DestDir: "{reg:HKLM\SOFTWARE\Microsoft\VisualStudio\7.0,InstallDir|}HTML\XMLLinks\1031"; Flags: ignoreversion; 076 Source: "wxwin.ico"; DestDir: "{app}"; Flags: ignoreversion 077 078 [Icons] 079 Name: "{group}\wxWindows HTML 2 Help"; Filename: "{cf}\Microsoft Shared\Help\dexplore.exe"; Parameters: "/helpcol ms-help://wxWindows"; WorkingDir: "{app}"; IconFileName: "{app}\wxwin.ico" 080 081 [Tasks] 082 Name: showreadme; Description: "Display Readme.txt"; Flags: unchecked 083 Name: showhelp; Description: "Display wxWindows 2.4.1 Help"; Flags: unchecked
|
H2Reg : by Helpware > H2Reg FAQ >