Rob*_*beN 10
就像TLama所说,ssPostInstall如果你想在安装过程完成后添加密钥,就可以实现它.
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep=ssPostInstall then begin
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\HHSTECH',
'InstallPath', ExpandConstant('{app}'));
end;
end;
Run Code Online (Sandbox Code Playgroud)
或者您可以AfterInstall在安装(复制)最后一个文件后调用它.
[Files]
Source: ".\THEVERYLASTFILE.XXX"; DestDir: "{app}"; AfterInstall: MyAfterInstall
[Code]
procedure MyAfterInstall();
begin
RegWriteStringValue(HKEY_LOCAL_MACHINE, 'Software\HHSTECH',
'InstallPath', ExpandConstant('{app}'));
end;
Run Code Online (Sandbox Code Playgroud)
[Registry]
Root: HKLM; Subkey: Software\HHSTECH; ValueType: string; ValueName: InstallPath; ValueData: {app}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6995 次 |
| 最近记录: |