PDA

View Full Version : msiexec /uninstall {GUID} /qn REMOVE=ALL



sappu17
06-30-2005, 02:06 PM
I created a new Custom Action which has the executable file name as cmd.exe in the C:\WINDOWS\system32 folder.

I added
msiexec /uninstall {GUID} /qn REMOVE=ALL
for the command line, but it gives me an error. I am not sure if this is the right way of doing this.

RobertDickau
06-30-2005, 03:17 PM
What are you trying to do? Where are you calling this action?

Some misc. comments:
Only one MSI Execute sequence can be running at a time, so you wouldn't be able to call this from a custom action in the Execute sequence.

The /uninstall option is new to MSI 3.x, and wouldn't work on a target system with MSI 2.x (you could use the equivalent /x switch). Also, REMOVE=ALL is understood in an uninstall operation.

You can launch msiexec.exe directly without going through cmd.exe.

Having said all that, a major upgrade might be more appropriate for this kind of thing...

sappu17
06-30-2005, 04:42 PM
OH! Only one msi file can run at once? That makes sense now. I am trying to do the msiexec custom action while I am installing another msiexec install.

But, I didnt find any other way to do it. I want to uninstall the existing version on the target system and I want this to happen before installing a new install. So, I made a custom action and the sequence so that it runs as the <firstaction>

Do you know any other way of doing this?

RobertDickau
06-30-2005, 04:52 PM
You might look into major upgrades to see if one of those would do what you want; you'll need to specify the upgrade code of the earlier product, along with a range of versions you want to remove...