ISTool问题

时间:2013-05-28 14:22:22

标签: registry inno-setup istool

我如何通过IST​​ool设置这些东西:

  • 如何基于64/32系统设置安装路径?我想看看,如果用户有32/64系统,该设置将使用正确的安装路径。

  • 我想,该设置将创建特定的注册表项,其中将是基于用户安装文件夹的安装路径。用户可以更改文件夹,但我不知道如何创建动态注册表项。我可以创建修复注册表项,它将编写我想要的内容。

Example: HKEY_CURRENT_USER\Software\Ascaron Entertainment\Sacred 2]
"ShortcutProgramMenu"="Installed"
"Language"="en_UK"
"Speech"="en_UK"
"MovieTrack"="5"
"CurrentVersion"="2.34.0.0"
"InstallPath"="{PATH}\\"
"LastUpdateCheck"=dword:000b3872

[HKEY_LOCAL_MACHINE\SOFTWARE\Ascaron Entertainment\Sacred 2]
"Language"="en_UK"
"Speech"="en_UK"
"MovieTrack"="5"
"InstallPath"="{PATH}\\"
"CurrentVersion"="2.34.0.0"

我想要的,InstallPath将基于用户决定。 求助。

1 个答案:

答案 0 :(得分:2)

您的[Registry]部分如下所示:

[Registry]
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "ShortcutProgramMenu"; ValueData: "Installed";
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "Language"; ValueData: "en_UK";
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "Speech"; ValueData: "en_UK";
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "MovieTrack"; ValueData: "5";
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "CurrentVersion"; ValueData: "2.34.0.0";
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "InstallPath"; ValueData: "{app}\";
Root: HKCU; Subkey: Software\Ascaron Entertainment\Sacred 2; 
ValueType: dword; ValueName: "LastUpdateCheck"; ValueData: "$000b3872";
Root: HKLM; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "Language"; ValueData: "en_UK";
Root: HKLM; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "Speech"; ValueData: "en_UK";
Root: HKLM; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "MovieTrack"; ValueData: "5";
Root: HKLM; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "InstallPath"; ValueData: "{app}\";
Root: HKLM; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "CurrentVersion"; ValueData: "2.34.0.0";

在这种情况下,如果您要在64bit系统上安装应用程序,您会在HKLM中找到Wow6432Node个密钥。但是,如果您希望/需要将密钥添加到64位分支,则可以使用Check: IsWin64创建其他条目。

示例:

Root: HKLM; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "CurrentVersion"; ValueData: "2.34.0.0"; Check: not IsWin64
Root: HKLM64; Subkey: SOFTWARE\Ascaron Entertainment\Sacred 2; 
ValueType: string; ValueName: "CurrentVersion"; ValueData: "2.34.0.0"; Check: IsWin64