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
- :
- Chance to cancel a major upgrade
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
‎Jan 13, 2011
11:36 AM
Chance to cancel a major upgrade
I'm looking for any help on trying to find a way that I could prompt a user during a Major Upgrade that the previous version will be uninstalled if they continue with the installation.
There may be reasons that some of our users may want to keep our previous version of our program so they may not want to uninstall that version yet.
I've been looking for a way that I can give them a confirmation message box (so that would need an OK/Cancel buttons) that if they continue with the installation the previous version will be uninstalled.
Can anyone give me any help with this? I'm using IS2011 with a basic MSI package. If this is possible, please try to give me as much details as possible since I still get lost within the InstallShield Development window.
Mike...
There may be reasons that some of our users may want to keep our previous version of our program so they may not want to uninstall that version yet.
I've been looking for a way that I can give them a confirmation message box (so that would need an OK/Cancel buttons) that if they continue with the installation the previous version will be uninstalled.
Can anyone give me any help with this? I'm using IS2011 with a basic MSI package. If this is possible, please try to give me as much details as possible since I still get lost within the InstallShield Development window.
Mike...
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
07:16 AM
I am not exactly sure what you want to do so here are some questions for clarification:
Is it the case that you would want the two application versions to reside side by side?
Or is the scenario that you want nothing to be installed if the user says don't Upgrade.
The first case is quite complex to achieve as you would have to make sure that no conflicts occur between the two versions if installed on the same system.
The second case is simpler but still requires some "fiddling".
Here are the steps to get it done:
1. Use a System Search to detect if your previous application is installed. You can check for its productCode, registry keys, files etc. Any check that is unique to your installation is good. Store this in a PUBLIC property called for example FOUNDUPGRADE. Make sure that FOUNDUPGRADE is not located in your property manager table, if it is make sure its empty (not 0 value but really empty). Type System Search in Installshield help for more info.
2. You then make a simple vbscript custom action that gets executed after the SystemSearch action but before the launchcondition action and has the condition FOUNDUPGRADE. Set it in the Install UI sequence and it should be executed immediately (custom action settingsin InstallShield IDE)
3. vb script should look like this:
4. The final step is set a Launch Condition that checks if UNINSTALLPREVIOUS=7 (that is the no return value) and then gives a nice message to the user. See the attached image for clarification on this step.
good luck
Walt
Is it the case that you would want the two application versions to reside side by side?
Or is the scenario that you want nothing to be installed if the user says don't Upgrade.
The first case is quite complex to achieve as you would have to make sure that no conflicts occur between the two versions if installed on the same system.
The second case is simpler but still requires some "fiddling".
Here are the steps to get it done:
1. Use a System Search to detect if your previous application is installed. You can check for its productCode, registry keys, files etc. Any check that is unique to your installation is good. Store this in a PUBLIC property called for example FOUNDUPGRADE. Make sure that FOUNDUPGRADE is not located in your property manager table, if it is make sure its empty (not 0 value but really empty). Type System Search in Installshield help for more info.
2. You then make a simple vbscript custom action that gets executed after the SystemSearch action but before the launchcondition action and has the condition FOUNDUPGRADE. Set it in the Install UI sequence and it should be executed immediately (custom action settingsin InstallShield IDE)
3. vb script should look like this:
Session.Property("UNINSTALLPREVIOUS")=msgbox ("This will perform an upgrade and uninstall your previous version. Hit Yes if OK, click No to cancel installation", vbYesNo, "Upgrade Detected")
4. The final step is set a Launch Condition that checks if UNINSTALLPREVIOUS=7 (that is the no return value) and then gives a nice message to the user. See the attached image for clarification on this step.
good luck
Walt
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
07:50 AM
Walt,
Thanks, the option 2 is basically exactly what I want to do and your steps really help.
I only have one problem. I've never created or added a VBscript to an installation setup so I'm at a loss on how to do this. I've been searching for anything that would help in actual steps in doing this. I started to walk through the Custom Action Wizard but it looks like I have to bring it in as an external file? So I'm not sure exactly what this external file should look like.
Can you or anyone else help me in creating and adding a VBscript file? I really appreciate it and then this hopefully will do just what I want.
Mike
Thanks, the option 2 is basically exactly what I want to do and your steps really help.
I only have one problem. I've never created or added a VBscript to an installation setup so I'm at a loss on how to do this. I've been searching for anything that would help in actual steps in doing this. I started to walk through the Custom Action Wizard but it looks like I have to bring it in as an external file? So I'm not sure exactly what this external file should look like.
Can you or anyone else help me in creating and adding a VBscript file? I really appreciate it and then this hopefully will do just what I want.
Mike
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 14, 2011
08:08 AM
John,
To add a vbscript custom action go to Custom Actions and Sequences, right click on Custom Actions and select New VBScript -> stored in Custom action. Name this custom Action whatever you want.I name it MSGboxYESNO.
You have two tabs in the right pane of your screen. One is Common where you configure all the custom action settings and one is Script where you just dump your script in. I filled in the values I mentioned in the common tab and made a screenshot. Script tab just contains the script.
Oh yeah I also changed the condition to "Not Installed AND FOUNDUPGRADE".
This makes sure that the custom action only takes place during Installation.
To add a vbscript custom action go to Custom Actions and Sequences, right click on Custom Actions and select New VBScript -> stored in Custom action. Name this custom Action whatever you want.I name it MSGboxYESNO.
You have two tabs in the right pane of your screen. One is Common where you configure all the custom action settings and one is Script where you just dump your script in. I filled in the values I mentioned in the common tab and made a screenshot. Script tab just contains the script.
Oh yeah I also changed the condition to "Not Installed AND FOUNDUPGRADE".
This makes sure that the custom action only takes place during Installation.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2011
07:59 AM
Walt,
I really appreciate the help. This has taught me a lot. I've just about got it all set up but I'm getting an error on the message box and it doesn't matter which button I click on.
My Message box is being displayed as expected:
![](/legacyfs/online/vb/8906_Img01.jpg)
But then it displays this error when I click either button:
![](/legacyfs/online/vb/8907_Img02.jpg)
The vbScript code is as follows which is pretty much what you originally listed (I even tried your exact line and I still got the error):
This is the only line of code I have in the Scirpt and there is a line feed at the end of the code line.
So do you have any thoughts as to what I might be doing incorrectly?
Mike...
I really appreciate the help. This has taught me a lot. I've just about got it all set up but I'm getting an error on the message box and it doesn't matter which button I click on.
My Message box is being displayed as expected:
![](/legacyfs/online/vb/8906_Img01.jpg)
But then it displays this error when I click either button:
![](/legacyfs/online/vb/8907_Img02.jpg)
The vbScript code is as follows which is pretty much what you originally listed (I even tried your exact line and I still got the error):
Session.Property("UNINSTALLPREVIOUS")=msgbox ("This will perform an upgrade and uninstall your previous version." & vbCrLf & "Hit Yes if OK, click No to cancel installation", vbYesNo, "Upgrade Detected")
This is the only line of code I have in the Scirpt and there is a line feed at the end of the code line.
So do you have any thoughts as to what I might be doing incorrectly?
Mike...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 17, 2011
10:06 AM
A bit of a nooby mistake on my part John.
You can only place strings in properties, and that value was an integer(7), so you need to change the vbscript a bit. This should do it.
And you're welcome. I've been finding information on this forum for quite a while now, and I thought I should contribute a bit. 🙂
You can only place strings in properties, and that value was an integer(7), so you need to change the vbscript a bit. This should do it.
Temp=msgbox ("This will perform an upgrade and uninstall your previous version." & vbCrLf & "Hit Yes if OK, click No to cancel installation", vbYesNo , "Upgrade Detected")
Session.Property("UNINSTALLPREVIOUS")=cStr(Temp)
And you're welcome. I've been finding information on this forum for quite a while now, and I thought I should contribute a bit. 🙂
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)