简体   繁体   English

安装Shield 2009 Premier,卸载不会关闭进程/ gui

[英]Install Shield 2009 Premier, Uninstall doesn't close the process/gui

My application (developed using C#.net) is open now i uninstall, InstallShield gives message stating the application is already open and whether really want to close the application. 我的应用程序(使用C#.net开发)现已打开,我已卸载,InstallShield给出了消息,指示该应用程序已打开以及是否真的要关闭该应用程序。 Selection 'Ignore' continues uninstall. 选择“忽略”继续卸载。 Some files and the exe of the application are not closed. 应用程序的某些文件和exe文件未关闭。 How to close them by installshield on uninstall. 如何在卸载时通过installshield关闭它们。 Or there are some properties I have to set. 或有一些我必须设置的属性。 I know adding a custom action at uninstall i can kill the process, but shouldn't installshield do it? 我知道在卸载时添加自定义操作可以杀死该进程,但是installshield不应该这样做吗?

If your project type is InstallScript MSI or it supports Installscript, i prefer to write code for this for example: 如果您的项目类型是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;

The above example give the skeleton, you need to implement the logic for ProcessRunning, ProcessEnd and ServiceRemoveDuringUninstallation methods, you can refer Installshield help doc they have given documentation with along with source code 上面的示例给出了框架,您需要实现ProcessRunning,ProcessEnd和ServiceRemoveDuringUninstallation方法的逻辑,可以参考他们提供给文档的Installshield帮助文档以及源代码。

hope this helps... 希望这可以帮助...

If your goal is to restart the open applications and not honor the "Ignore" selection, you might consider setting the "REBOOT" property to "Force". 如果您的目标是重新启动打开的应用程序并且不遵循“忽略”选择,则可以考虑将“ REBOOT”属性设置为“ Force”。 That will ask that user to restart the system, thus achieving your desired result. 这将要求该用户重新启动系统,从而达到您想要的结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM