2009-05-29 49 views
0

我的应用程序(使用C#.net开发)现在打开我卸载,InstallShield提供消息指出应用程序已经打开并且是否真的要关闭应用程序。选择“忽略”继续卸载。某些文件和应用程序的exe不会关闭。如何在卸载时通过installshield关闭它们。或者我必须设置一些属性。我知道在卸载时添加自定义操作,我可以杀死进程,但不应该安装installshield吗?安装Shield 2009 Premier,卸载程序未关闭进程/ gui

回答

0

如果您的目标是重新启动打开的应用程序并且不兑现“忽略”选择,您可以考虑将“REBOOT”属性设置为“强制”。这将要求用户重新启动系统,从而达到您想要的结果。

+0

1.硒tup应用程序(运行setup.exe),2.运行程序,3.现在卸载程序(程序仍然打开),4. UnInstall警告应用程序已打开,5.继续卸载选择忽略,6卸载完成,7 。现在结果是exe文件和一些dll没有被删除,应用程序仍然是打开的! 我的意思是,在卸载过程中不应该自动关闭应用程序,并通过卸载删除相关的DLL和EXE文件? 如果应用程序未打开,卸载将删除安装过程中复制的每个文件/目录。 – Samir 2009-06-06 21:46:45

0

如果你的项目类型的InstallScript MSI或支持INSTALLSCRIPT,我喜欢写代码,此例如:

export prototype _Server_UnInstalling(); 
function _Server_UnInstalling() 
STRING Application, ServiceName; 
begin  
    //application name 
    Application = "Demo"; 
    MessageBox("In _Server_UnInstalling",INFORMATION); 
    //Check whether application is running or not. 
    if ProcessRunning(Application) then 
     MessageBox("Demo is running",INFORMATION); 
     //Close server Application 
     ProcessEnd(Application); 
    endif;       

    //if application is having service at the background then 
    ServiceName = "Demo Server"; 
    //Uninstall the server windows services on uninstallation. 
    ServiceRemoveDuringUninstallation(ServiceName); 

end; 

上面的例子给出的骨架,你需要实现逻辑ProcessRunning, ProcessEnd和ServiceRemoveDuringUninstallation方法,你可以参考Installshield的帮助文档,他们给文档连同源代码

希望这有助于...

相关问题