|
Re: Runas problem (kind of....): msg#00264windows.autoit.user
> Maybe I can leave it up to the user, but do you > have an idea on how? I used to redirect the output to a text file > and check for an error in the text file. using run,runas doesn't > allow you to redirect to a text file. > > red runas.exe kicks out an errorlevel... compile the following, changing the %user% and %pass% and see what happens... ;runas test SetBatchLines,150 SetWinDelay,1 SetTitleMatchMode,2 setenv,user,username setenv,pass,password ifequal,0,1,Goto,%1% Run,"%A_SCRIPTFULLPATH%" runas RunWait,runas /user:%user% cmd.exe MsgBox,4096,test,%errorlevel% Exit runas: winwait,runas.exe,,60 IfEqual,errorlevel,1,Exit Sleep,500 IfWinNotActive,runas.exe,,WinActivate,runas.exe WinWaitActive,runas.exe,,60 IfEqual,errorlevel,1,Exit Send,%pass%{ENTER} Exit ;... as for making it a useful function when the script Isn't compiled... I don't know how you will get the errorlevel from runas without the RunWait... Larry ------------------------ Yahoo! Groups Sponsor ---------------------~--> Looking for the latest Free IT White Papers? Visit SearchMobileComputing.com to access over 500 white papers. Get instant access at SearchMobileComputing.com Today http://us.click.yahoo.com/ZyjvfD/PLNGAA/uitMAA/EGnolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: AutoItList-unsubscribe@xxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Runas problem (kind of....): 00264, Redndahead |
|---|---|
| Next by Date: | New Runas Extension: 00264, Private Name |
| Previous by Thread: | Re: Runas problem (kind of....)i: 00264, Redndahead |
| Next by Thread: | Re: Runas problem (kind of....): 00264, Redndahead |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |