Jump to content

Recommended Posts

Posted

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

Posted

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)

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...