Glenn,

Thanks again for the major assist here, feels like we're close. Tried the last bit of code and it steps right through debug no probs, but after two exe's are running it doesn't hit the "ELSE" condition, it just launches a third.

Full script code below (some comments removed, all code posted). The latest code is added at the bottom of the script. I did make some minor adjustments.

 Code:
SetConsole("HIDE")
; Declaring variables
;
; PZB = defines what PZB path will be set within CER.ini
; CER = defines where our user's CER.ini file is saved too, and looked for
; PFX = defines the value for PFX for claimsview
; MENU = defines the value for Menu for Claimsview
;
$pzb="\\root\Production$$"
$cer="\\root\userconfigs$$\@userid\Production"
$pfx="0001"
$Menu="Y"
;
;
$Message="	     You are not allowed to run more than two copies of OurApp.	     "
; Checking for Cer.ini, copying it if it's not there.
;
IF NOT Exist ("\\root\userconfigs$$\@userid")
	MD "\\root\userconfigs$$\@userid"
EndIf
;
IF NOT Exist ("$cer\cer.ini")
	MD "$cer"
	Copy "\\root\cer$$\cer.ini" "$cer"
	writeprofilestring ("$cer\cer.ini", "System", "PzbPath", "$pzb")
EndIf
;
writeprofilestring ("$cer\cer.ini", "CLAIMVIEW", "PFX", "$pfx")
writeprofilestring ("$cer\cer.ini", "ClAIMVIEW", "MENU", "$menu")
;
;
$MaxSess=2
$Tasklist='tasklist /FI "Username eq %USERDOMAIN%\%USERID%" /FI "Imagename eq App.exe"'
$aResult=WshPipe($Tasklist)
;
If UBound($aResult) < ($MaxSess +1)
	 Run "C:\appname\app\app.exe $cer\cer.ini"
Else
	MessageBox ("$Message","   ***You are not allowed to run more than two App sessions***   ",0,10)
EndIf
;
Exit



TS