An update to my new PowerShell install script

I needed new functionality in my PowerShell install script (previously mentioned here). I needed the ability to make sure a process is not running, and if it is running, I could prompt the user to close it.

The new function takes the process name value from the config xml file (as I mentioned in previos post) and if it is running, displays a message box until the program is no longer running.

Function WaitForProcessToStop ($Step){
	$ProcessName= ($Step.ProcessName.Value).split(".")[0]
    if ($ProcessName -ne "") {
		While (get-process $ProcessName -ea SilentlyContinue | select -Property Responding)
			"Please close $ProcessName", 
			"Please close $ProcessName", 


Comments are closed.

Powered by WordPress. Designed by WooThemes