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
- :
- Stop installation from VBScript in Web project
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
‎May 21, 2008
01:51 PM
Stop installation from VBScript in Web project
I have a web install project that is automatically uninstalling previous instances of the software (as it should). However, I want to display a dialog box to the users to confirm the removal of the local data along with the other files. I have created a VBScript custom action to do this, however my issue is that I can't seem to exit the install process from the custom action. I have tried various ways to create the VBScript, but it seems most people on these boards say to use a function, so this is what I currently have:
function ConfirmUninstall()
retval = msgbox ("A previous version is installed. If you continue, all existing data will be lost. Continue?", 4, "Warning!")
if retval = 7 then
' exit the installation
ConfirmUninstall = 1602
end if
end function
ConfirmUninstall()
One post suggested that any non-zero exit code will cause the installer to quit. However, this doesn't seem to be the case in a web project unless I am mistaken.
My question is simply, how do I make the install sequence actually exit from a web project?
Any help is greatly appreciated!
EDIT:
Some additional info -
I have inserted the Custom Action in the Execution Sequence right after the Setup Initialization. This CA has a condition to only execute if there is an existing installation. The message box does pop up at the right time, but the install doesn't exit.
The CA properties are:
Synchronous (check exit code)
Immediate Execution
function ConfirmUninstall()
retval = msgbox ("A previous version is installed. If you continue, all existing data will be lost. Continue?", 4, "Warning!")
if retval = 7 then
' exit the installation
ConfirmUninstall = 1602
end if
end function
ConfirmUninstall()
One post suggested that any non-zero exit code will cause the installer to quit. However, this doesn't seem to be the case in a web project unless I am mistaken.
My question is simply, how do I make the install sequence actually exit from a web project?
Any help is greatly appreciated!
EDIT:
Some additional info -
I have inserted the Custom Action in the Execution Sequence right after the Setup Initialization. This CA has a condition to only execute if there is an existing installation. The message box does pop up at the right time, but the install doesn't exit.
The CA properties are:
Synchronous (check exit code)
Immediate Execution
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 21, 2008
03:52 PM
One thing to check is, is your VBScript in an external file? For some reason, VBScript action functions with the VBScript code embedded in the CustomAction table can't return a value.
Also, perhaps have the function return the value 3 (IDABORT) when you want to exit?
Also, perhaps have the function return the value 3 (IDABORT) when you want to exit?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 22, 2008
01:07 PM
Thanks Robert. It seems that using the script directly in the custom action was the cause. As soon as I moved it to the .vbs file, it worked like a charm.
Thanks again!
Thanks again!