Link to home
Create AccountLog in
Avatar of Mike Hammer
Mike HammerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

powershell check uninstall successful before continuing

powershell  to check an uninstall has worked before continining

using msiexec /x   to remover the software.

but I'd like a while loop or something before reinstalling new version
Avatar of Michael B. Smith
Michael B. Smith
Flag of United States of America image

if you "start-process -wait" the msiexec or "start /wait" from cmd.exe, then you don't get control back until the removal is complete. that's what I do (and check the return status for success).
Avatar of Mike Hammer

ASKER

how do I check return status ? thank you.       I'm currently checking registry thAts it's no longer there. but if the removal process generated  a return even better
ASKER CERTIFIED SOLUTION
Avatar of Michael B. Smith
Michael B. Smith
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
understood. thank you