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;