InstallShield在卸载完毕后,自定义动作

有时候当我们有日志文件在安装目录时,InstallShield清除不干净安装目录。那么我们可以自定义

删除安装目录.

InstallShield X:

//如果是卸载最后阶段

Onmoved函数中加入

if REMOVEALLMODE != 0 then
//MessageBox(TARGETDIR,WARNING);
DeleteDir(TARGETDIR,ALLCONTENTS) ;
endif;

另外,(!MAINTENANCE))用来判断是否在维护

InstallShield 6.2

1.定义一个全局变量BOOL bUnInstalled;
2.Before Move Data/onBegin中设为FALSE(安装,卸载,修复,重装都会运行)
3.Before Move Data/Maintenance UI Before/Dlg_ObjDialogs
switch(nType)
case REMOVEALL: ComponentRemoveAll(); bUnInstalled = TRUE;//卸载时运行
4.Afer Move Data/OnEnd(安装,卸载,修复,重装都会运行)

if bUnInstalled then
DeleteDir(TARGETDIR, ALLCONTENTS);
else
//MessageBox(“installed/Modify/Change”,WARNING);
//MessageBox(TARGETDIR,WARNING);
endif;

thedarkside

这是一个最好的时代,这是一个最坏的时代。

stay connected

228,480

Fans

21,563

Followers

20,563

Followers

8,125

Subscribers

2,253

Subscribers

10,563

Followers

最新文章

entertainment
Buckingham Palace soil used in Tate exhibit
Oct 13, 2016
Sports
Legendary coach Steve Spurrier was truly
Oct 13, 2016
Technology
Acer reveals all-in-one Windows 10 PC
Oct 13, 2016
entertainment
Revival allows Selena Gomez to shed
Oct 13, 2016
entertainment
Buckingham Palace soil used in Tate exhibit
Oct 13, 2016
Sports
Legendary coach Steve Spurrier was truly
Oct 13, 2016
Technology
Acer reveals all-in-one Windows 10 PC
Oct 13, 2016
entertainment
Revival allows Selena Gomez to shed
Oct 13, 2016