/build/static/layout/Breadcrumb_cap_w.png

Uninstall software via Custom Action?

I'm not having much luck getting anything to remove via the "upgrade" property in the MSI.

No errors (that show up anyway), but it just doesn't remove the product.

I know how to remove the products via the command line (msiexec /x {GUID#blahblahblah}). And that works if I run it manually.

What I want/NEED is for the MSI to remove that FIRST, and then do the install of the "regular" program.

So I'm not sure if "Upgrade" is the proper place to put it in, or custom action (can you call msiexec from custom action?)

0 Comments   [ + ] Show comments

Answers (13)

Posted by: monster 17 years ago
Senior Yellow Belt
0
Hi kjhurni,

I'm not sure how upgrade works in MSI.. =)
But it is possible to do it via custom action.. you can use msiexec in your command line to uninstall the application..
just make it the first action...


hope this helps..
Posted by: fuz_kitten 17 years ago
Second Degree Blue Belt
0
Don’t forget msiexec grabs a mutex – that is, you can not launch Msiexec more than once as Monster is proposing.

Can you post your upgrade table? What version are you upgrading from?
Posted by: nheim 17 years ago
10th Degree Black Belt
0
Hi kjhurni,
that's definitely the wrong path you are walking here!
There is no bypass to figure out, why your upgrade isn't working!
The thing Mark is suggesting will not work silently, eg. you would have to author it into the 'InstallUISequence' table.
Like Charlie stated, the call to the second MSI isn't possible from the 'InstallExecuteSequence' table, because you can't start a second server process.

To get the upgrade working, check the following things:
Switch on logging, see: http://itninja.com/question/what-is-pxe?3
Make a line in the upgrade table with the upgrade code from your app to upgrade, put nothing into the 'VersionMin' + 'VersionMax' fields, '256' to attributes and an 'ActionProperty'.
Make sure, your 'ActionProperty' property is part of the 'SecureCustomProperties' property.
Make sure, the 'RemoveExistingProducts' sequence is not authored at the end of the 'InstallExecuteSequence' table.
Search the logfile for 'FindRelatedProducts'. There must be an entry with the 'ActionProperty' property, you defined.

Regards, Nick
Posted by: kjhurni 17 years ago
Orange Belt
0
ORIGINAL: fuz_kitten

Don’t forget msiexec grabs a mutex – that is, you can not launch Msiexec more than once as Monster is proposing.

Can you post your upgrade table? What version are you upgrading from?



Sure. I'm upgrading from ESR ArcGIS 9.1 to 9.2

Right now, I'm trying to do the "desktop" product.

Here's what my upgrade table looks like (I added the 2nd line. The first line was already in there by ESRI):

UpgradeCode VersionMin VersionMax Language Attributes Remove ActionProperty
{018BA370-2717-4E1D-A502-9517B6039E6E} 9.2.1323 9.2.1323 1033 773 UPGRADE_1
{40F8FD5F-4701-48D6-A8FC-1F188007DF38} 9.0 9.1.722 1024 OLD_91DESK
Posted by: kjhurni 17 years ago
Orange Belt
0
ORIGINAL: nheim

Hi kjhurni,
that's definitely the wrong path you are walking here!
There is no bypass to figure out, why your upgrade isn't working!
The thing Mark is suggesting will not work silently, eg. you would have to author it into the 'InstallUISequence' table.
Like Charlie stated, the call to the second MSI isn't possible from the 'InstallExecuteSequence' table, because you can't start a second server process.

To get the upgrade working, check the following things:
Switch on logging, see: http://itninja.com/question/what-is-pxe?3
Make a line in the upgrade table with the upgrade code from your app to upgrade, put nothing into the 'VersionMin' + 'VersionMax' fields, '256' to attributes and an 'ActionProperty'.
Make sure, your 'ActionProperty' property is part of the 'SecureCustomProperties' property.
Make sure, the 'RemoveExistingProducts' sequence is not authored at the end of the 'InstallExecuteSequence' table.
Search the logfile for 'FindRelatedProducts'. There must be an entry with the 'ActionProperty' property, you defined.

Regards, Nick


I'll turn on logging, but in regards to the Upgrade Code: The Upgrade Code from the 9.1 version is NOT the same as the GUID for the "uninstall". Also, that upgrade code cannot be found anywhere on the pc's local registry, so I'm not sure if that will work. From my understanding, the "findrelatedproducts" looks on the local pc for THAT upgrade code (and since it's not there on the registry, it will never find it), right?

RemoveExistingProducts was at the end (seq. 1617). I changed it to 1405 in the InstallExecuteSequence.

The ActionProperty is defined in both places (meaning the Upgrade Table, and the Property Table in the SecureCustomProperties property).
Posted by: fuz_kitten 17 years ago
Second Degree Blue Belt
0
What do you mean “The Upgrade Code from the 9.1 version is NOT the same as the GUID for the "uninstall””. Are you talking about the upgrade code not being the same as the product code? I.e. The GUID you use if you run msiexec /x {GUID#blahblahblah}? Anyway, if you are – it’s not going to be the same so dont stress.

Nicks right, make sure you have the VersionMinInclusive and VersionMaxInclusive bits set. I.e. Your attribute should set to 768 (256+512).

Give it a go and report back!

Charlie
Posted by: kjhurni 17 years ago
Orange Belt
0
Yeah, that's what I meant.

Anyway, I followed "nheim's" post and it actually found it. The ONLY thing I changed was to clear out the min and max values, and I also set the attribute to 256 (I'd tried 512 and 1024 to no avail). So my guess is that it was something with the version numbers.

Once I did that (oh, also set the Upgrade Code to the actual "Upgrade Code" GUID in the 9.1 MSI), the "msgbox" showed that it found it and it seems to be working.

THANK YOU THANK YOU THANK YOU.

As a followup, if I need to remove multiple things, can I just continue to add more "upgrade codes" in there?
Posted by: fuz_kitten 17 years ago
Second Degree Blue Belt
0
Add away, no problem there.

Point of note: try and keep your upgrade codes the same for all versions of the same software. That way you'll only have to change the max version next time round.

Chaz
Posted by: kjhurni 17 years ago
Orange Belt
0
Unfortunately I don't write the software, ESRI does, and they change the Upgrade Codes for each version. So 9.2 has a diff. Upgrade Code than 9.1 and when 9.3 or whatever comes out, I'm sure that it'll have a diff. Upgrade Code than 9.2

Of course, ESRI can't even figure out how to do an "upgrade" and their official "upgrade" process requires that the user manually remove 9.1 Guess they never heard of the "UpgradeCode" in an MSI?

haha
Posted by: nheim 17 years ago
10th Degree Black Belt
0
Hi kjhurni,
you made some progress, i see.
Glad, it worked out.
Keep MSI'ing :-)
Regards, Nick

PS: What about giving Charlie a star for the patient help, provided?
Posted by: fuz_kitten 17 years ago
Second Degree Blue Belt
0
A star and a free ticket to ManageFusion [:)]
Posted by: nheim 17 years ago
10th Degree Black Belt
0
Hi Charlie,
how modest you are. :-)
Las Vegas, Sidney or Malta? :-))
Posted by: fuz_kitten 17 years ago
Second Degree Blue Belt
0
ooo I should think Malta nice this time of year ...
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ