Hello,
i created this PS script
## IdentifyingNumber will be stored in a vraiable
$myApp = “7-z”
$app = Get-WmiObject win32_product | Where-Object {$_.name -match $myApp}
WAIT
$app.IdentifyingNumber
$appIN = $app.IdentifyingNumber
## Unisntallation
start msiexec.exe /X$appIN /qn
Where i put in WAIT the script should be stopped until the Get-Wim command is done.