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

Prevent uninstallation if application is running


3 replies to this topic

suvidha

suvidha
  • Members
  • 72 posts

Posted 27 June 2001 - 03:09

i am using Installshield Professional for windows Installer 2.0.

And our application is a small one with no keys being created in registry.

Now,  i  want to abort 'Uninstallation' if the application is running.

Any clues are welcome..


suvidha

suvidha
  • Members
  • 72 posts

Posted 27 June 2001 - 03:22

i just read that we should use Maintence() function to create a key in registry and check that before unisntall.
Now my question is: if i create a key in registry then, is it necessary to reboot the machine after completing installation?

Please help.
If anyone has simpler solution, pl let me know.


suvidha

suvidha
  • Members
  • 72 posts

Posted 27 June 2001 - 03:32

Just realised that Maintenence(),  DeinstallStart() are NOT supported in Installshield Professional for Windows installer!!!

help awaited!


Gripper4Hire

Gripper4Hire
  • Members
  • 9 posts

Posted 16 July 2001 - 23:23

Can you detect if your app is running using FindWindow?

If you can, you can author a Custom Action that, if it finds the App using the FindWindow function, create a property for it (ex. call MsiSetProperty (hMSI,"AppRunning","1") to create a property called "AppRunning", and set its value to "1".)

Place this customaction in the UI sequence (using a condition "Installed" or better "ProductState=2 OR ProductState=5").

Later in your UI sequence, author a TYPE 19 Custom Action, giving it's Target Field "Must shutdown app before you uninstall...", and call this customaction later in the UI Sequence given the condition "AppRunning=1". This will abort the install / uninstall with the message specified.