Queener Posted April 25, 2013 Share Posted April 25, 2013 For some reason I run ShellExecute("C:\users\aq\desktop\bin\3 - Servertest.bat") and all it does is open and close. Not suppose to happen. Inside the batch file: servertest.exe packt.dat If I run Servertest.bat without autoit, The batch stays until I close it. Any suggestion? Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 25, 2013 Moderators Share Posted April 25, 2013 Why use the batch file at all? Why not simply do something like this? ShellExecute(<path to servertest.exe>, 'packt.dat') "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...
Developers Jos Posted April 25, 2013 Developers Share Posted April 25, 2013 If I run Servertest.bat without autoit, The batch stays until I close it. Any suggestion?Likely the workdir is different when ran manually? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Queener Posted April 25, 2013 Author Share Posted April 25, 2013 (edited) The autoit will be outside of bin for example desktop. I tried ShellExecute('\bin\servertest.exe', 'packt.dat') but it doesn't work. "Unable to parse line" Edited April 25, 2013 by asianqueen Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") Link to comment Share on other sites More sharing options...
kylomas Posted April 25, 2013 Share Posted April 25, 2013 asianqueen, Try specifying the fully qualified path to the executable. kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Vincor Posted April 25, 2013 Share Posted April 25, 2013 If for any reason you still want/need to call that batch file, add a "pause" command at the end of your batch. Then it won't just "open and close", but stay open so you can read any error messages your servertest application writes to the console. Link to comment Share on other sites More sharing options...
Queener Posted April 25, 2013 Author Share Posted April 25, 2013 that works too, but it closes the batch file after execute. I guess there's no way to keep the batch file open. Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.") 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