Uninstall - Target Still Running?

  • Thread starter Thread starter Thom Little
  • Start date Start date
Hi Thom,

We cannot force MSI to show that dialog. It will show the dialog when it
thinks it is necessary. Just for a simple example:

1. Create a bare bone Windows application.
2. Add a new Setup project to the solution.
3. Add the primary output of the Windows application to the Setup project.
4. Build the Setup project.
5. Install the MSI generated on a test Windows XP machine.
6. Open the Windows application installed. Keep the window open.
7. Right-click the MSI and select "Uninstall".
8. You will see the dialog saying that we should close the application
before continuing the install.

Please give it a try and see whether this helps or not.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Felix:

Thank you ... that was exactly the lead I needed.

The dialog is automatically displayed during an uninstall if
ShowInToolbar is True and the application is active
If either is not the case then the dialog is not shown.

My application is a slight hack (of course) and does not display the form or
display the application on the toolbar. (My application is controlled
through an icon in the system tray.) As a result, the dialog is never
triggered during an uninstall if the application is running.

I apparently will need to continue using my custom action during uninstall
to get the application shut down.

Thanks again.
 
Hi Thome,

Thanks for your update.

However, the .Net custom actions may not be able to achieve your goal here,
as they are run after the default checking performed by Windows Installer.

You may give it a try and see whether the custom actions help or not.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
The uninstall custom action I had created and used earlier continues to work
correctly.

Mine requires that you shut down the application before you are allowed to
continue in the uninstall.
 
Hi Thom,

I am glad to hear that the custom action works. If you have any further
concerns, please feel free to post here. You may also post MSI related
issues under "microsoft.public.platformsdk.msi". I believe you will get
more responses there.

Have a nice day.

Regards,

Felix Wang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top