简体   繁体   中英

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. Selection 'Ignore' continues uninstall. Some files and the exe of the application are not closed. How to close them by installshield on uninstall. 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?

If your project type is InstallScript MSI or it supports Installscript, i prefer to write code for this for example:

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

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". That will ask that user to restart the system, thus achieving your desired result.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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