Here's how I do it:
nsExec::Exec 'powershell -command "& {Do {$PF = ps PROC_1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Name; If ($PF) {ps PROC_2,PROC_3 -ErrorAction SilentlyContinue | kill; Start-Sleep -Seconds 2}} Until (!$PF)}"' This command kills PROC_2 and PROC_3 prosesses while PROC_1 process is runningThe same PS script in normal condition for example.
Do {
$PF = ps PROC_1 -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Name
If ($PF) {
ps PROC_2,PROC_3 -ErrorAction SilentlyContinue | kill
Start-Sleep -Seconds 2
}
} Until (!$PF) Everything works fine, but I need to run it parallel the installer, like a nsExec::ExecNoWait like a start "" powershell ... anallog in cmd.Is it possible in nsis ?
Or maybe there is another way out ?
Sorry for bad english and hello from Russia 😕