Jump to content
Sign in to follow this  
Queener

Run batch file

Recommended Posts

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.")

Share this post


Link to post
Share on other sites

If I run Servertest.bat without autoit, The batch stays until I close it. Any suggestion?

Likely the workdir is different when ran manually?

Share this post


Link to post
Share on other sites

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 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.")

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.")

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...