This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Force application to close before uninstall
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
08:11 AM
Force application to close before uninstall
Is there a way to force my Users to close the application they are trying to uninstall before they start the uninstaller? I have searched the forms and have not found anything useful. I have a dialog that tells them that they should close it first but I want to force them to close before the uninstaller starts, that way I don't have to listen to them ask why there are still files on their machines after the uninstall.
Thanks,
Thanks,
(8) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
10:12 AM
Create a Custom dialog in the Finish Section of the Dialogs to show the message you wish to display like - Close app and rerun uninstallation!
Create a Custom Action to check if your app is running in the Uninstallation Sequence - PreUninstall section of the Sequences. Set a string flag to true or false in this action if it is running or not.
if (appisrunning){
arg0.getServices().getISDatabase()setVariableValue("FLAG", "true");
}
Add the Dialog after this Custom Action with a string comparison '$V(FLAG) = true' to show the dialog!
I have not tried this but seems logical!
Regards,
Tom
Create a Custom Action to check if your app is running in the Uninstallation Sequence - PreUninstall section of the Sequences. Set a string flag to true or false in this action if it is running or not.
if (appisrunning){
arg0.getServices().getISDatabase()setVariableValue("FLAG", "true");
}
Add the Dialog after this Custom Action with a string comparison '$V(FLAG) = true' to show the dialog!
I have not tried this but seems logical!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
10:49 AM
I know that I need to add the code for the custom action into the Events section for the particular bean, but where do I set the string comparison '$V(FLAG) = true'
Again thanks for your help
Again thanks for your help
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
11:23 AM
For the dialog that you add in your sequence!
In the conditions click all the way to right of the box where it says 'No Conditon', it will bring up the condition builder - click on Add condition and select the string comparison. For the Compare text use $V(FLAG) - not quotes and Source is the value you set: true -> again no quotes!
In the conditions click all the way to right of the box where it says 'No Conditon', it will bring up the condition builder - click on Add condition and select the string comparison. For the Compare text use $V(FLAG) - not quotes and Source is the value you set: true -> again no quotes!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2006
02:55 PM
Oh ok, I have not done much custom work with InstallShield, most of the installers I have been creating are configured easily out of the box. I am starting to understand all of this. When I put the code:
if (appisrunning){
arg0.getServices().getISDatabase().setVariableValue("FLAG", "true");
}
in the events list I get an error trying to compile. The error is cannot find symbol, variable appisrunning. I tried creating a string variable appisrunning and it would not fix the problem. Any thoughts on how I can fix this?
if (appisrunning){
arg0.getServices().getISDatabase().setVariableValue("FLAG", "true");
}
in the events list I get an error trying to compile. The error is cannot find symbol, variable appisrunning. I tried creating a string variable appisrunning and it would not fix the problem. Any thoughts on how I can fix this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 26, 2006
09:53 AM
If the app runs in a window, and just killing the window is a valid option, then you can use the following:
nHwnd = FindWindow("", "MyApp");
if (nHwnd != NULL) then
SendMessage (nHwnd, 0x0002, 0, 0);
endif;
nHwnd = FindWindow("", "MyApp");
if (nHwnd != NULL) then
SendMessage (nHwnd, 0x0002, 0, 0);
endif;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 27, 2006
10:08 AM
MotoJason - I think your dealing with a windows type installer!!
MEinstaller - sorry - for the 'appisrunning' you need to write the code to figure that one out! I have not done anything with figuring out what is running - not much of a java guy here but do some research I'm sure there is a way to see if the process is running or not! But you need to write your own code to set the appisrunning to true or false!! I was just showing how you can get the uninstaller to stop and have them close the app!
Regards,
Tom
MEinstaller - sorry - for the 'appisrunning' you need to write the code to figure that one out! I have not done anything with figuring out what is running - not much of a java guy here but do some research I'm sure there is a way to see if the process is running or not! But you need to write your own code to set the appisrunning to true or false!! I was just showing how you can get the uninstaller to stop and have them close the app!
Regards,
Tom
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 27, 2006
11:02 AM
Thanks Tom,
I will try to write some code and see if I can make it work, I'm still learning Java, that's one reason I'm having such a hard time. Thanks for your help though.
I will try to write some code and see if I can make it work, I'm still learning Java, that's one reason I'm having such a hard time. Thanks for your help though.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 27, 2006
03:03 PM
Tom,
I sure was. Sorry, I had not noticed that this was a Multiplatform installer.
I sure was. Sorry, I had not noticed that this was a Multiplatform installer.