Avatar of Mike Hammer
Mike Hammer
Flag 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
Powershell

Avatar of undefined
Last Comment
Mike Hammer

8/22/2022 - Mon
Michael B. Smith

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).
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
Michael B. Smith

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mike Hammer

ASKER
understood. thank you
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck