sumitd Posted August 22, 2013 Share Posted August 22, 2013 I have a .bat file that eXecutes the following: E:tempInstaller6.50.exe /s /extract-only REM IxOS6.50EB.exe /s /extract-only %SystemDrive% 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. sumitd. Link to comment Share on other sites More sharing options...
orbs Posted August 22, 2013 Share Posted August 22, 2013 (edited) 1) conversion bat -> au3: usually you do not convert, you rewrite. in your example: RunWait('E:\temp\Installer6.50.exe /s /extract-only') FileChangeDir(@ProgramFilesDir&'\InstallerCache\InstallerPro\'&$CmdLine[1]) 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 August 22, 2013 by orbs Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
sumitd Posted August 22, 2013 Author Share Posted August 22, 2013 Thanks orbs for the quick reply. I will try that. BR, sumitd 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