Some application after closing save some data into its .ini-file. When I use
Stop-Process -Name applictin_name
it closing app, but state does not save into .ini
Ho can I correctly close the application with powershell?
Some application after closing save some data into its .ini-file. When I use
Stop-Process -Name applictin_name
it closing app, but state does not save into .ini
Ho can I correctly close the application with powershell?
It's just a shame it doesn't work in combination with the if
keyword.
$running = Get-Process prog -ErrorAction SilentlyContinue
if (!$Running){
Get-Process virtualdj | Foreach-Object { $_.CloseMainWindow() | Out-Null }
}