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
- :
- Uninstall Installscript from Basic MSI
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
‎Aug 05, 2008
09:07 AM
Uninstall Installscript from Basic MSI
We are in the process of converting our Installscript project to Basic MSI.
Is it possible to update the previous installscript project from the basic msi?
Or can I kick off the installscript uninstaller from the msi and then have the msi continue afterwords? The reasoning for this is that the msi needs to read the currently installed version and run some various scripts accordingly.
Thanks in advance.
Is it possible to update the previous installscript project from the basic msi?
Or can I kick off the installscript uninstaller from the msi and then have the msi continue afterwords? The reasoning for this is that the msi needs to read the currently installed version and run some various scripts accordingly.
Thanks in advance.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 05, 2008
10:34 AM
you could use the UninstallApplication function in an InstallScript CA http://helpnet.acresso.com/robo/projects/installshield12langref/UninstallApplication.htm
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 06, 2008
08:46 AM
This seems to work like I need. Thanks!
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2008
02:08 PM
So I thought I had this figured out but I was wrong. I am having a tough time getting the MSI install to wait for the Installscript Install to Uninstall.
Here is my installscript code.
[CODE]
// set initial buffer size
nLength = MAX_PATH + 1;
MsiGetProperty(hMSI, "SUPPORTDIR", szSupportDir, nLength);
sSupportFile = szSupportDir ^ "remove.iss";
szAdditionalCmdLine = "/s /f1" + "\"" + sSupportFile + "\"";
//MessageBox("AddCmdLine : " + szAdditionalCmdLine, INFORMATION);
szUninstallKey = "{00609589-8D58-466F-A7D0-2C3F56506674}";
nOptions = LAAW_OPTION_WAIT_INCL_CHILD | LAAW_OPTION_HIDDEN;
nReturnValue = UninstallApplication ( szUninstallKey, szAdditionalCmdLine, nOptions );
if (nReturnValue < ISERR_SUCCESS) then
xf_RecordInLogFile(hMSI, "[ERROR] Error Uninstalling previous version");
sReturnValue = FormatMessage ( nReturnValue );
xf_RecordInLogFile(hMSI, "[ERROR] Error Message: " + sReturnValue);
MessageBox("Error uninstalling previous version.", SEVERE);
nFuncReturnValue = ERROR_INSTALL_FAILURE;
else
sbIsUpgradeFromPreMSI = "true";
xf_RecordInLogFile(hMSI, "[INFO] Previous version uninstalled successfully");
nFuncReturnValue = ERROR_SUCCESS;
endif; [/CODE]
The Uninstall does execute and works silently but the MSI installer continues as well. How do I get the MSI to wait ? After researching in the forums I tried clone_wait with no success.
I am launching the installscript from a Custom Action in the Execute sequence that occurs just after ISSetupFilesExtract. Any ideas? Thanks.
Here is my installscript code.
[CODE]
// set initial buffer size
nLength = MAX_PATH + 1;
MsiGetProperty(hMSI, "SUPPORTDIR", szSupportDir, nLength);
sSupportFile = szSupportDir ^ "remove.iss";
szAdditionalCmdLine = "/s /f1" + "\"" + sSupportFile + "\"";
//MessageBox("AddCmdLine : " + szAdditionalCmdLine, INFORMATION);
szUninstallKey = "{00609589-8D58-466F-A7D0-2C3F56506674}";
nOptions = LAAW_OPTION_WAIT_INCL_CHILD | LAAW_OPTION_HIDDEN;
nReturnValue = UninstallApplication ( szUninstallKey, szAdditionalCmdLine, nOptions );
if (nReturnValue < ISERR_SUCCESS) then
xf_RecordInLogFile(hMSI, "[ERROR] Error Uninstalling previous version");
sReturnValue = FormatMessage ( nReturnValue );
xf_RecordInLogFile(hMSI, "[ERROR] Error Message: " + sReturnValue);
MessageBox("Error uninstalling previous version.", SEVERE);
nFuncReturnValue = ERROR_INSTALL_FAILURE;
else
sbIsUpgradeFromPreMSI = "true";
xf_RecordInLogFile(hMSI, "[INFO] Previous version uninstalled successfully");
nFuncReturnValue = ERROR_SUCCESS;
endif; [/CODE]
The Uninstall does execute and works silently but the MSI installer continues as well. How do I get the MSI to wait ? After researching in the forums I tried clone_wait with no success.
I am launching the installscript from a Custom Action in the Execute sequence that occurs just after ISSetupFilesExtract. Any ideas? Thanks.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2008
12:51 PM
I still haven't been able to find a solution. Anyone have any ideas?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2008
01:46 PM
Just a guess: Maybe try changing the value for the custom action's Return Processing setting (in the Custom Actions and Sequences view).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2008
03:03 PM
Right, I should have thought of that. Works perfectly now...thanks.