I'm using Wise Package Studio. I am wondering how I can have a MSI remove 2 others when it is uninstalled.

Scenrios:
App1 + App2 + App3
App1 + App3

Apps 2 and 3 will only show up in Add/Remove. The actual Remove, Repair, Modify will be unavailable. When App1 is removed by clicking the Remove button, it needs to remove App3 and then App2 off the machine and then itself.

I tried creating a REMOVE~="ALL" condition in App1 that msiexec /X's both product codes. However, since you can only have 1 instance of the engine running, it bombs.

I have tried to do a nested install "Install MSI" with the product codes of both MSI's and the property set to REMOVE=ALL. I set this to happen after InstallValidate. I set a REMOVE condition on this as well. When I remove App1, this condition runs and I can tell it is doing something to App3 and App2. However, when totally done, App1 is gone, but App2 and 3 still show up in Add/Remove and when I right click on the MSI's that actually installed them, I am able to run a 'Uninstall' on them. I would think if they were truely removed, I would get the msg, "Product not installed" or some such language.

I also tried to modify the UninstallString for App1 and set it to a WiseScript that will run the msiexec /X on App3, then 2 and finally 1. When I installed all 3 and click the 'Remove' button in ARP for App1, it runs the msi engine, not my script. This may be due to syntax but I have quotes where needed. For some reason it is not reading the UninstallString.

Any ideas?! Thanks!
Zerg
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
I like playing with the power subsystems of the computer itself. I'm sure someone will have a problem with what I am about to suggest, but to each their own. If I was trying to solve your scenario, I would set it up that the MSI script on uninstall would run a batch file that would call "msiexec /uninstall {name.msi or ProductCode}"

Of course only choose one of the two options in the curly braces and then drop the curly braces.

That is what I would do.

Ty
Answered 01/31/2008 by: tmiller
Senior Yellow Belt

Please log in to comment
0
I've tried what you mentioned. It doesn't work because when you uninstall App1.. the MSI engine is tied up. So when you fork out to a batch file that issues a msiexec /uninstall .. it fails because you can only have 1 instance of the engine running.
Answered 01/31/2008 by: Zerg
Senior Yellow Belt

Please log in to comment
0
Your right! Where was my head on that one?! Sheesh.

Instead, give this a gander and see if it looks helpful to you. http://support.microsoft.com/kb/306439

I can email you a copy of Orca if you dont want to spend the time finding it and dont already have it.
Answered 01/31/2008 by: tmiller
Senior Yellow Belt

Please log in to comment
0
Ok, so I create a condition of If REMOVE~="ALL"

I browse to the App2 and App3 MSI's and have them 'sucked' into the binary of App1. I set the property to REMOVE=ALL.

I then set a End on the initial REMOVE~="ALL" condition. So basically when App1 is removed, it will run the nested 'installs' of App2 and 3 which have been 'sucked' into the binary. The property of the 'install' is REMOVE=ALL which should remove those nested MSI's. When I remove App1, it appears App2 and 3 are being removed, or at least something is happening.. as the uninstall is taking more time and more things are happening than a standard App1 uninstall.

When it all completes however, App2 and 3 are still in the Add/Remove Control Panel. Also, when I right-click on App2.msi and App3.msi and select 'Uninstall' from the context menu, it does come up saying, 'Would you like to uninstall this product?'. If it truely was removed during the nested uninstall, it should come up saying something like 'Error this product is not installed' or whatever the message is.

Ideas?
Answered 01/31/2008 by: Zerg
Senior Yellow Belt

Please log in to comment
0
Take a look in your event viewer after you have uninstalled and see if there is any Errors. This would of course be after it looked like it was doing something, but nothing appears to have happened. See if there is any indication in there as to a possible reason why the uninstalls might be failing.

I am going to be out of office for a bit, next reply wont come so quick.
Answered 01/31/2008 by: tmiller
Senior Yellow Belt

Please log in to comment
0
Event Viewer is showing App1, 2 and 3 installed and then App1 removed successfully. It does not show anything about App2 or 3 being removed.
Answered 01/31/2008 by: Zerg
Senior Yellow Belt

Please log in to comment
0
In my research of a resolution to my problem, I came across this;

http://forums.altiris.com/messageview.aspx?catid=44&threadid=47917&enterthread=y

EdT says,
"I don't believe you can perform a nested uninstall if the original install wasn't a nested install."

Since App2 and 3 are not nested installs of App1, it appears this won't work. Creating a wrapper that will remove App3, 2 and finally 1 is not a problem. I just wanted to find a way for it all to work in case a Tech clicks the 'Remove' button on App1 in ARP.

If you end up finding a way to do this, please post and let me know.
Answered 01/31/2008 by: Zerg
Senior Yellow Belt

Please log in to comment
0
It might be possible to change your uninstall in HKLM\Software\MicrosoftWindows\CurrentVersion\Uninstall\{GUID} and point the appropiate key to a wrapper.
Then kicking [Remove] would probably start the wrapper and you could uninstall the progs from the wrapper with msiexec /x {guid}.
Answered 04/10/2008 by: Jemboy2004
Senior Yellow Belt

Please log in to comment
0
its sufficient Remove="ALL"
Answered 05/06/2008 by: axsysbabu
Orange Belt

Please log in to comment
0
ORIGINAL: axsysbabu
its sufficient Remove="ALL"
Nice try, but completely false. You might want to read entire threads first before responding.
Answered 05/07/2008 by: VBScab
Red Belt

Please log in to comment
0
dont quote me on this but last time i check this (which was years ago now) if memory serves me right the nested product does not get registered at all.

i believe all the components of the nested msi get placed under the original MSI's components. (much like that of a merge module)

if you want to prove this theory read this blog .

http://johnmcfadyen.spaces.live.com/blog/cns!9DD01136FC094724!136.entry

and test the results.
Answered 05/07/2008 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
0
Hi Zerg,
there is one solution for this problem.
You need to create a custom action type 34 to call msiexec, and place it at the very end in the 'InstallExecuteSequence' (has to be after InstallFinalize!).
You need to set the "continue" and the "async" flags, that makes the CA to 226.
Use an AppSearch entry to search for the uninstall reference in the registry and set appropriate conditions to the action.
Regards, Nick
Answered 05/07/2008 by: nheim
Tenth Degree Black Belt

Please log in to comment
Answer this question or Comment on this question for clarity