大家好,怎样使installshield6.22打包的安装程序,在卸载之前执行一个命令如:regservice.exe -unreg,谢谢!
请大家帮帮忙,谢谢!急。。
请大家帮帮忙,谢谢!急。。
解决方案 »
- 上位机
- 内存映射文件
- SNMP难题!
- 找本关于驱动程序设计的书,主要是想要做一个猫的驱动或者 是关于网络方面的也行
- 【简单问题,50分,解决立刻结贴】调用Dll中函数
- 请问大家知不知道哪里有开发游戏机模拟器的资料,我想开发,但无从下手呀~~~
- 菜鸟问个问题????有win32编程,那么请问有win64编程吗??
- 如何 将BYTE ID[2]送给id
- 请教在WINNT 4.0下使用_outp(),_inp()的方法
- 对一个对话框中的list框中获取字符串,对字符串进行筛选,把筛选出来的字符串输出在另一个对话框的list框中
- 我的程序为什么只能调OnAccept函数
- 在线等待,百分求解,SQL语句查询的问题,请大家帮忙
/////////// CloseSoftware //////////
////////////////////////////////////////////////////////////////
function CloseSoftware()
STRING szProgram, szCmdLine;
NUMBER nResult;
begin
szProgram = TARGETDIR^"\\CloseProcess.exe";
szCmdLine = "";
if (LaunchApp(szProgram, szCmdLine) < 0) then
MessageBox("Close SoftWare Error!", SEVERE);
else
return 0;
endif;
return 0;
end;function OnMaintUIBefore()
STRING svResult,szCaption;
NUMBER nResult;
begin
// TO DO: if you want to enable background, window title, and caption bar title
// SetTitle( @TITLE_MAIN, 24, WHITE );
// SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION );
// SetColor(BACKGROUND,RGB (0, 128, 128));
// Enable( FULLWINDOWMODE );
// Enable( BACKGROUND );
//Maintenance Mode
CloseSoftware();
svResult = SdLoadString(IFX_MAINTUI_MSG);
szCaption = SdLoadString(IFX_ONMAINTUI_CAPTION);
nResult = SprintfBox(MB_OKCANCEL,szCaption,"%s",svResult);
if (nResult = IDCANCEL) then
exit;
elseif(nResult = IDOK) then
// setup default status
SetStatusWindow(0, "");
Enable(STATUSEX);
StatusUpdate(ON, 100); //-->Remove all components
ComponentRemoveAll();
endif;
DeleteDir(TARGETDIR,ALLCONTENTS);
DeleteDir(TARGETDIR,ONLYDIR);
return 0;
end;
function OnUninstallingFile(szFile)
STRING strAgentFile,strComFile;
begin
strAgentFile = TARGETDIR^"agent.exe";
strComFile = TARGETDIR^"stdcom.dll";
if (StrCompare(szFile,strComFile) = 0||StrCompare(szFile,strAgentFile) = 0) then
LaunchAppAndWait(TARGETDIR^"regservice.exe","-unreg",WAIT);
endif;
end;
这么写为什么不成功。谢谢!
function CloseSoftware()
STRING szProgram, szCmdLine;
NUMBER nResult;
begin
szProgram = TARGETDIR^"\\regservice.exe";
szCmdLine = "-unreg";
if (LaunchApp(szProgram, szCmdLine) < 0) then
MessageBox("Close SoftWare Error!", SEVERE);
else
return 0;
endif;
return 0;
end;
编译不通过,找不到CloseSoftware。提示:
Compiling...
Folder: <C:\My Installations\代理服务监控制\Script Files>
Setup.Rul(121): error C8003: 'CloseSoftware' : function has no prototype declaration
Setup.Rul(131): error C8087: cannot return value from program
Setup.Rul(134): error C8087: cannot return value from program
Done- 3 error(s), 0 warning(s)我改怎么办?谢谢你!
prototype CloseSoftware();
我是这样做的
我在function OnMaintUIBefore() 下加入
LaunchAppAndWait(TARGETDIR^"regservice.exe","-unreg",WAIT);
加入这个就可以了!
谢谢随便看看!