logo       

Re: Re: Runas problem (kind of....): msg#00253

windows.autoit.user

Subject: Re: Re: Runas problem (kind of....)


That one worked.  :)

But a bit faster would be great.  More stealthy would also be nice.  I'd like it to be as seamless for the users as possible.  But hey, all I really wanted was something that worked.  :)

Thanks!

-Ken



try this...
lemme know if it needs to be faster and stealthy?


SetEnv,user,youruser
SetEnv,password,yourpass
SetEnv,your_program,your_exe_name_no_path
SetEnv,workdir,path_for_your_exe

SetTitleMatchMode,2
Run,runas /user:%user% "%comspec%"

WinWait,runas.exe,,30
IfEqual,errorlevel,1,Goto,noGood
IfWinNotActive,runas.exe,,WinActivate,runas.exe
WinWaitActive,runas.exe,,30
IfEqual,errorlevel,1,Goto,noGood
Send,%password%{ENTER}

WinWait,cmd.exe,,30
IfEqual,errorlevel,1,Goto,noGood
IfWinNotActive,cmd.exe,,WinActivate,cmd.exe
WinWaitActive,cmd.exe,,30
IfEqual,errorlevel,1,Goto,noGood
Send,cd "%workdir%"{ENTER}
Sleep,1000
Send,start "" "%your_program%"{ENTER}
Sleep,1000
WinClose,cmd.exe
Exit

noGood:
MsgBox,4096,Error,Script Error
Exit



Yahoo! Groups Sponsor
ADVERTISEMENT
136e06.jpg
136e7f.jpg

To unsubscribe from this group, send an email to:
AutoItList-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


To unsubscribe from this group, send an email to:
AutoItList-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise