ev0l Posted June 22, 2012 Share Posted June 22, 2012 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! Link to comment Share on other sites More sharing options...
JohnOne Posted June 22, 2012 Share Posted June 22, 2012 You don't usually get "Super awesome" tips when supplying less than even pseudo code. Try putting a little effort into your post, if you expect any effort in return, such as your failed code. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ev0l Posted June 22, 2012 Author Share Posted June 22, 2012 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 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 22, 2012 Moderators Share Posted June 22, 2012 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? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
ev0l Posted June 23, 2012 Author Share Posted June 23, 2012 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now