Jump to content
Sign in to follow this  

Need help with batch files and commands in autoit

Recommended Posts


I have a .bat file that eXecutes the following:

E:tempInstaller6.50.exe /s /extract-only

REM IxOS6.50EB.exe /s /extract-only


cd Program Files (x86)InstallerCacheInstallerPro%1

cmd /c setup.exe -s CannedConfig=Client AUTOREBOOT=No

goto exit


1) How do I convert these to Autoit commands ?

2) Is there any way in Autoit generate a .bat file on the fly -> run it & do the task -> delete .bat file after task is over  ?

Thanks in Adv.


Share this post

Link to post
Share on other sites

1) conversion bat -> au3: usually you do not convert, you rewrite. in your example:

RunWait('E:\temp\Installer6.50.exe /s /extract-only')
RunWait('setup.exe -s CannedConfig=Client AUTOREBOOT=No') 

- use RunWait() and FileChangeDir()

- the variable $CmdLine[1] is %1

- the macro @ProgramFilesDir is, well, the Program Files dir

- the character & concatenates strings:

check the help for each function, that would lead you to much more powerful capabilities.

2) generate and launch a batch file: a batch file is a simple text file, with .bat or .cmd extension. AutoIt can write and manipulate text files in any way you want, see function FileWrite() and FileWriteLine(). once that is done, use RunWait() to execute the file, and FileDelete() to delete it. again, look at the help for all these functions, the help should be your starting point to whatever you want to do.

Edited by orbs

Share this post

Link to post
Share on other sites

Thanks orbs for the quick reply. I will try that.



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