Sign in to follow this  
Followers 0
Guest Josh

Running Batch Files And FAQs

3 posts in this topic

A two-part question:

1. I want to run batch files from AutoIt. I'm sure it can be done, it's just that I'm brand new to the language and yadda yadda.

2. Is there not an FAQ section? I can't seem to find it.

Thanks,

Josh

Share this post


Link to post
Share on other sites



A two-part question:

1. I want to run batch files from AutoIt. I'm sure it can be done, it's just that I'm brand new to the language and yadda yadda.

2. Is there not an FAQ section? I can't seem to find it.

Thanks,

Josh

<{POST_SNAPBACK}>

The FAQ is both in the helpfile and sticky on the support forum...

You use Run to run batch files in autoit. See said helpfile.


"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It may sounds strange but Run indeed does not start .bat and .lnk files!

I had the same problem before.

Josh, you need to use START or the shell execute

E.g. START

$batname = 'c:\ect.bat' ;Fullpath here

Run(@comspec & /c START ' & $batname)

E.g. ShellEx (only W2000/XP)

$batname = 'c:\ect.bat'

Run(@SystemDir & '\RUNDLL32.EXE shell32.dll,ShellExec_RunDLL "' & $BatName & '"')

Edit: typo

Edited by ezzetabi

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  
Followers 0