procedure CurStepChanged(CurStep: TSetupStep);
var
setupName: String;
iniPath: String;
begin
case CurStep of
ssInstall: //复制文件前
begin
end;
ssPostInstall: //完成复制
begin
//将安装程序名称写入配置文件
iniPath := ExpandConstant('{app}'+'/option.ini');
setupName := ExtractFileName(ExpandConstant('{srcexe}'));
SetIniString('setup', 'name', setupName, iniPath);
end;
ssDone: //安装完成
begin
end;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
iniPath: String;
typeRegister: String;
url: String;
begin
case CurUninstallStep of
usUninstall:
begin
end;
usPostUninstall:
begin
//读取注册信息,生成url
iniPath := ExpandConstant('{userappdata}'+'/User.bin');
typeRegister := GetIniString('RegInfo', 'ProductType', 'trial', iniPath);
url := 'http://www.aaaa.com/uninstall.htm?type=' + typeRegister;
if UsingWinNT=True then
ShellExec('open', url, '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
end;
end;