less is more!
; Broken
$pid = RunAs("alternate_account", @ComputerName, "password", 4, "calc.exe")
; Works
;~ $pid = Run("calc.exe")
sleep(500)
$WinList = WinList()
for $i=1 to $WinList[0][0]
$wPID = WinGetProcess($WinList[$i][1])
if Not StringCompare($wPID, $pid) Then
ConsoleWrite("Found calc, setting title." & @LF)
WinSetTitle($WinList[$i][1], "", "Newitle")
EndIf
Next
I'm looking through security policies right now..
I'm on windows 7, tried both administrator and standard accounts for the RunAs username