Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstalling doesn't close open application?


4 replies to this topic

dbritt

dbritt
  • Members
  • 10 posts

Posted 15 December 2004 - 20:45

I was testing my Setup util when I accidently forgot to close the application before uninstalling. I noticed that when I ran the uninstall that the program did not close! It made it all the way through the uninstallation and the program was still running. Granted, everything I tried to do with the program threw an unhandled exception, but still, it was running. Then I tested it with it running and tried to INSTALL the program. The install didn't kill the application either! How do I get all instances of the currently installed program to be killed both by the installation and the uninstallation?

TIA

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 16 December 2004 - 07:52

Windows Installer won't kill the application for you. But the InstallValidate should automatically display a message to the user asking him to shut down the application. This only works for executables, and only if they have a window with a window title.

KapilMarwah

KapilMarwah
  • Members
  • 32 posts

Posted 16 December 2004 - 13:37

As Stefan said, Windows Installer doesn't kill processes. If you want this behavior then you must implement this using custom actions. As simple vb script can solve your purpose.

Kapil

dbritt

dbritt
  • Members
  • 10 posts

Posted 16 December 2004 - 19:28

QUOTE (Stefan Krueger @ 2004-12-16 07:52)
This only works for executables, and only if they have a window with a window title.

That's my problem then sad.gif

My program is only accessible from the system tray. I found the article on MSDN relating to what you said:

==================================

FilesInUse Dialog

The installer can determine when a reboot of the system is necessary and prompt the user with a request to reboot. Commonly, a system reboot is required because the installer is attempting to install a file that is currently being used. If the InstallValidate action detects the installation of a file in use it displays the FilesInUse Dialog.

If you expect the installer to display a FilesInUseDialog, but it does not, this may be due to one of the following reasons:


The files in use are not executables.
The installer is not actually trying to install those files.
The process holding those files is the process invoking the installation.
The process holding those files is one that does not have a window with a title associated with it.
==================================

How would I find my program if it does not have a title? When my program is displayed (and not minimized to the tray) the title of the window is "Options" and I think that's pretty generic, is there a better way at finding out if the program is running besides the title? If not, how do I find it when minimized?

dbritt

dbritt
  • Members
  • 10 posts

Posted 16 December 2004 - 20:08

I wrote an installer override for install/uninstall that searches for the process by processname and that APPEARS to work, thanks so much for the help wink.gif