Hi everyone

I've got a situation where an application has been installed pr. user on a number of machines and I need to create a silent uninstall that removes the application without logging on to the machines as the original user.

If I execute the uninstall like this: "msiexec.exe /x {GUID} /qb" I get the error: "This action is only valid for products that are currently installed.."

Does anyone know if it is possible to get this done anyways?

Best Regards,
Christian
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2
Yes, it is.

You *can* jump through the hoops of finding and deleting the munged ProductCode (and other associated entries) in the 'Managed' section of the registry then execute the MSI but by far and away the simplest route is build an uninstalling MSI. When it has finished "installing", have it run MSIZap (downloadble from MS, if you don't alrwady have it) passing the old product's ProductCode.
Answered 01/18/2012 by: VBScab
Red Belt

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
Not sure whether it will work in all instances but how about running the Uninstall 'only when user is logged in' (If your deployment tool has that option).

I never used msizap but seems to be a useful & powerful tool in this type of cases.
Answered 01/18/2012 by: SandeepPanat
Orange Senior Belt

Please log in to comment
0
Hi VBScab

Ty for your reply.
I've already dabbled with good old MSIZap but initially dropped it because it ended up giving me problems with the Program Compatibility Assistant.
(most of my users are running W7 64 bit)
but since you recommend using it, I've chosen to disabel it using wise script and it runs like a charm.

Thanks!

Best Regards,
Christian
Answered 01/18/2012 by: Roejbaek
Senior Yellow Belt

Please log in to comment
0
Hi SandeepPanat

Ty for your reply.

We are running both SMS and SCCM and I know the "only when a user is logged in" but in this case the problem is that the user that installed the program is the one that has to uninstall it and that is not possible.

But as you can see MSIZap was the way to go.
I am not sure if Microsoft still supports it.. because it is very easy to mess things up.. but it works :)

Best Regards,
Christian
Answered 01/18/2012 by: Roejbaek
Senior Yellow Belt

Please log in to comment
0
I am not sure if Microsoft still supports itI don't think it was ever supported. Indeed, I seem to recall the EULA for the Platform SDK said someone like "Using the tools provided can cause irretrievable damage to your computer and you use them at your own risk."because it is very easy to mess things up.. but it works :) Just like RegEdit LOL
Answered 01/18/2012 by: VBScab
Red Belt

Please log in to comment
0
"Using the tools provided can cause irretrievable damage

Like when you give it to one of your on-site supporters who accidentially hits the "Select all-button" and then removes all info for every single product on the computer? :)

(actually happened a few years ago.. the guy had like 15 years of experience)
Answered 01/18/2012 by: Roejbaek
Senior Yellow Belt

Please log in to comment
0
You could first try reinstalling the app to allusers and then uninstall. Of course, this would depend on how large the app is and how much time you want the users to wait while it does the initial reinstall and then uninstall. Unless the end result is to move to an allusers install...

http://msdn.microsoft.com/en-us/library/windows/desktop/aa371175(v=vs.85).aspx

So maybe something like this:

msiexec.exe /i filename.msi REINSTALL=ALL REINSTALLMODE=vomus ALLUSERS=1
Answered 01/18/2012 by: jmaclaurin
Third Degree Blue Belt

Please log in to comment
0
Hey Jmaclaurin

That actually sounds like a possible solution but in this particular instance it doesn't work.

Trying to reinstall for all users just provides me with an eror saying that the product is already installed and should be uninstalled through the control panel.... which one cannot do since it is only visible for the actual user that did the install in the first place.

I dont know if this is the product in question or the windows installer speaking though.

But thanks for the input.
Answered 01/19/2012 by: Roejbaek
Senior Yellow Belt

Please log in to comment
0
I'm pretty sure I got that to work for me at one time, but I can't remember the exact circumstances.

Another alternative might be to export the uninstall reg key from HKCU, change it to HKLM and then import. That might provide you with an all users uninstall. The catch will be that whatever is stored within the user's profile during install can't be referenced/removed during uninstall. You may need to do some scripting to set up the environment pre-uninstall. There may also be problems if the MSI was cached.

Was the original install performed by a user or by System? If you know the account that was used, you could use Autologon and Runounce to restart the machine, login, uninstall, delete the autologon, and then restart again. Again, this comes back to just how important this is because that will really impact the end user. This won't work if the installer was System. (FYI - I've had to do this and it works, just not user friendly and prone to failure)
Answered 01/19/2012 by: jmaclaurin
Third Degree Blue Belt

Please log in to comment
0
Thx for all the input, they might come in handy some other time :)
(I solved this one using MSIZap as VBScab also suggested.)

I haven't tried the autologon idea before. Sounds interesting.. but in this case the org. install may have been performed by any one of 50 technicians from a range of different locations so..
Answered 01/19/2012 by: Roejbaek
Senior Yellow Belt

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