By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,480 Members | 763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,480 IT Pros & Developers. It's quick & easy.

Custom action to uninstall two packages on commit

P: n/a
We have developed an application that will replace the older version. The
older versions comes in two flavors, a Lite and a Pro version. I can
successfully remove the previous version of either the Lite or the Pro
version by sync'ing the "Product Code" and increasing the version number of
the new setup, but I really need to remove both versions upon a successful
installation. So I have added two custom actions under "Commit" and I have
also tried "Install". For both custom actions I have created the following
vb script:

Set oShell = CreateObject("WScript.Shell")
oShell.Run Property("CustomActionData"),,False
Set oShell = Nothing

I set the the CustomActionData property of the custom actions to "msiexec /q
/uninstall " followed by the product code of each version (Lite & Pro).

But as you might have guessed this will not work because the custom actions
will be run while the setup that calls the custom actions is still running.
I will get the messagebox stating that "another setup is already in
progress..."

- I do not want to use another tool like WiseScript or InstallShield, ...
- I do not want to create a seperate setup project with 3 custom actions
(install, uninstall, uninstall)

Any leads on how to run msiexec.exe to uninstall a product in a custom
action?

Thx

--
Gabriel Lozano-Morán
MCSD .NET
Real Software
http://www.realsoftware.be
http://www.realdn.net
Feb 3 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.