0

I want to use msiexec to uninstall some programs without going through confimation boxes.

the problem is when I use this command

msiexec.exe /x "{product id}" /quiet

then nothing happens and the program does not uninstall.

when I use

msiexec.exe /x "{product id}" /passive

I see the progress bar appears and disappears quickly but the program does not actually uninstall.

  • The programs im working with have msiexec.exe in their uninstallstring – mython paster Jan 4 at 21:01
  • @postanote mentions the quotation marks; to the best of my understanding, you cannot use them at all if you are providing the product ID that is enclosed in French braces. However, I think your probably really is that you are suppressing the interface and the uninstall is showing an error. I would suggest trying the command without the attempt to keep it silent, so that you can see the error (since it wants interaction, it won't remove the program when you do so.) Then, use /qb instead of /quiet, so you can see basic progress, or /qr for reduced interaction. – Debra Jan 9 at 17:57
0

Are you trying to do this locally only or remotely?

Unless you are doing this in the power shell consolehost, you really should not need the quotes.

Yet, I'd use this command as a try as well...

msiexec /qn /x '{ProductId}'

If you are doing this in one of the editors, then you need to sue the Start-Process cmdlet.

https://powershellexplained.com/2016-10-21-powershell-installing-msi-files

If it is remote, see this discussion.

https://social.technet.microsoft.com/Forums/scriptcenter/en-US/bee082be-701d-4ef2-80b1-b9541446e2f6/powershell-20-invokecommand-remote-msiexec-uninstall

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.