EliTe_ThuT Posted February 9, 2007 Share Posted February 9, 2007 (edited) Hi, I would like to know what is the thing that doesn't work with this, and how to resolve it. #include <Process.au3> $01 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}ServiceLogger.exe -i{ENTER}net start servicelogger{ENTER}") Sleep(5000) $02 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}net stop servicelogger{ENTER}ServiceLogger.exe -d{ENTER}") Thanks Edited February 9, 2007 by EliTe_ThuT Link to comment Share on other sites More sharing options...
joshiieeii Posted February 9, 2007 Share Posted February 9, 2007 (edited) Have you tried running this command in a dos box manually? I suspect your command is flawed. I know for a fact that _RunDOS works wonderfully, there is something wrong with your command. It looks like your use of @scriptdir is used incorrectly and the ENTER is not supposed to be there either. RTFM! Edit: and your name is misleading, you are note elite =) Edited February 9, 2007 by joshiieeii Projects:Vista Gui ImageX Deployment Tool - CompletedActive Directory Helper - CompletedGlobalized Outlook and OWA Signature Project - Completed Link to comment Share on other sites More sharing options...
/dev/null Posted February 9, 2007 Share Posted February 9, 2007 Hi, I would like to know what is the thing that doesn't work with this, and how to resolve it. #include <Process.au3> $01 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}ServiceLogger.exe -i{ENTER}net start servicelogger{ENTER}") Sleep(5000) $02 = _RunDos("cd " & @ScriptDir & "\exe{ENTER}net stop servicelogger{ENTER}ServiceLogger.exe -d{ENTER}") Thanks Who told you to use {ENTER} in the string for _RunDos(). I'm pretty sure it was NOT the help file, right? __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
therks Posted February 9, 2007 Share Posted February 9, 2007 (edited) _RunDOS is not like Send(). It doesn't accept keys like {ENTER}. _RunDOS is literally, just like entering this into your Start > Run command. %comspec% /c $sCommand Where $sCommand is obviously what you would pass to _RunDOS() To accomplish what you're looking to do, I would suggest filewrite'ing to a bat file. Something like this: $hFile = FileOpen('mybatch.bat', 2) FileWriteLine($hFile, "cd " & @ScriptDir & "\exe") FileWriteLine($hFile, "ServiceLogger.exe -i") FileWriteLine($hFile, "net start servicelogger") FileClose($hFile) RunWait('mybatch.bat') *Edit: Wow, I guess I took too long, two posts before mine that weren't there when I started writing. Edited February 9, 2007 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
/dev/null Posted February 9, 2007 Share Posted February 9, 2007 *Edit: Wow, I guess I took too long, two posts before mine that weren't there when I started writing. You needed 18 minutes for that text? Tsk, tsk, tsk.... __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
therks Posted February 9, 2007 Share Posted February 9, 2007 You needed 18 minutes for that text? Tsk, tsk, tsk.... I... type... slow... My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
MHz Posted February 10, 2007 Share Posted February 10, 2007 Give this a try RunWait('"' & @ComSpec & '" /c ServiceLogger.exe -i & net start servicelogger', @ScriptDir & "\exe", @SW_HIDE) Link to comment Share on other sites More sharing options...
EliTe_ThuT Posted February 11, 2007 Author Share Posted February 11, 2007 kk... I'll try all of these 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