Jump to content

Recommended Posts

Posted

When using RunAs (/profile + /env) i can no longer do things like WinSetTitle to the spawned window, i tried compiling a test script and running it as the same user in windows but still not able to change the title

Super awesome if someone can give me a tip here!

Posted

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

Posted

Hi, ev0l. I tried your code on a Win7 VM and it worked just fine. Are you trying this on a standalone computer or in a domain setting?

Hey, uhm damn ;)

I havent setup any domain stuff just default settings.. dident get a chance to work anymore on this yesterday ill do some more tests!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...