Answered Uninstalling programs using force?

Adagio

Well-known member
Joined
Dec 12, 2005
Messages
162
Programming Experience
Beginner
I'm currently in a situation where I need to uninstall a certain program from a local computer (and automatically install a newer version of that program), because this old version of the program randomly causes my program to malfunction

I have found this article:

CodeProject: How to list all Programs installed on Computer and Uninstall Them . Free source code and programming help

This shows how to start the uninstall program for the programs I need to uninstall, which is a good start. I also have created all the code needed to install the newer version of the program

But as this program will be used by users, I want to minimize the number of times the users has to do something. So far the only popup that I haven't been able to get rid of is when the uninstall program is being run
Does anybody here know how to force it to uninstall without having the program ask for confirmation?
 
Last edited:
I would try the 'quiet' switch for the msiexec: /qn it appears.
 
Thanks, but how do I write the line with the arguments? Currently for my application it says:

/x{ce26f10f-c80f-4377-908b-1b7882ae2ce3}

I can't replace X, as X is the uninstall command from what I understand? I tried writing

/x/qn{ce26f10f-c80f-4377-908b-1b7882ae2ce3}

But that only pops up with a useless help
 
msiexec /x {package|ProductCode}
So the {...} part belongs to the /x switch. You can't break this, you have to add other switches after or before.
 
Back
Top