第一步:设置快捷方式
第二步:设置卸载上一版本
1: On Post Install
Shell.CreateShortcut(SessionVar.Expand(“%AppFolder%”),SessionVar.Expand(“卸载%ProductName%.exe”),SessionVar.Expand(“%AppFolder%\uninstall.exe”),SessionVar.Expand(" /U:%AppFolder%\Uninstall\uninstall.xml"),SessionVar.Expand(“%AppFolder%”),SessionVar.Expand(“%AppFolder%\uninstall.exe”),0,SW_SHOWNORMAL,nil,“”);
修改:
Shell.CreateShortcut(“%AppFolder%”, “卸载 NetManage.exe”, “%AppFolder%\uninstall.exe”, “/U:.\Uninstall\uninstall.xml”, “%AppFolder%”, “%AppFolder%\uninstall.exe”, 0, SW_SHOWNORMAL, nil, “”, START_OPTION_DEFAULT);
2: On Post Unstall
resultF = Folder.DoesExist(SessionVar.Expand(“%AppFolder%”));
if (resultF) then
Folder.DeleteTree(SessionVar.Expand(“%AppFolder%”),nil);
end
3:On Pre Install
result = File.Run(SessionVar.Expand(“%AppFolder%\uninstall.exe”), “/U:Uninstall/uninstall.xml”, SessionVar.Expand(“%AppFolder%”), SW_SHOWNORMAL, true);
Application.Sleep(5000);
第三步:卸载设置
第四步:项目设置
第五步:发布设置