qazwsx Posted August 29, 2008 Share Posted August 29, 2008 Is it possible to convert .bat files into .exes using autoit? Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 29, 2008 Share Posted August 29, 2008 Is it possible to convert .bat files into .exes using autoit?Not in one step, but wanting to do that is exactly what got me started using AutoIt! You rewrite the .bat file in AutoIt and then compile it like any other script. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
james3mg Posted August 29, 2008 Share Posted August 29, 2008 ...or FileInstall() the .bat, run it, and delete it at the end of the script. "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
Andreik Posted August 29, 2008 Share Posted August 29, 2008 (edited) Something like this PsaltyDS said: #include <File.au3> $PATH = FileOpenDialog("SELECT",@ScriptDir,"BAT File (*.bat)",1) $LINE = _FileCountLines($PATH) $FILE = FileOpen($PATH,0) $EXE = FileOpen(@ScriptDir & "\EXE.au3",2) FileWriteLine($EXE,"#include <Process.au3>") For $INDEX = 1 To $LINE FileWriteLine($EXE,'_RunDOS("' & FileReadLine($FILE,$INDEX) & '")') Next FileClose($EXE) FileClose($FILE) You should make to compile automatic with aut2exe. Use ShellExecute(). Edited August 29, 2008 by Andreik When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Glyph Posted August 29, 2008 Share Posted August 29, 2008 (edited) http://www.autoitscript.com/forum/index.ph...975&hl=.cmdBatch compiler! Edited August 29, 2008 by BackStabbed tolle indicium Link to comment Share on other sites More sharing options...
james3mg Posted August 29, 2008 Share Posted August 29, 2008 Something like this PsaltyDS said: #include <File.au3> $PATH = FileOpenDialog("SELECT",@ScriptDir,"BAT File (*.bat)",1) $LINE = _FileCountLines($PATH) $FILE = FileOpen($PATH,0) $EXE = FileOpen(@ScriptDir & "\EXE.au3",2) FileWriteLine($EXE,"#include <Process.au3>") For $INDEX = 1 To $LINE FileWriteLine($EXE,'_RunDOS("' & FileReadLine($FILE,$INDEX) & '")') Next FileClose($EXE) FileClose($FILE) You should make to compile automatic with aut2exe. Use ShellExecute().The only problem with that is that each line may not be independent...one line may check for the errorlevel of the one previous, for instance. Running a separate instance for each line would break that. So it depends on what you're doing (that is, what the batch file contains) "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
GentleManSteve Posted August 30, 2008 Share Posted August 30, 2008 I have used a freeware called "Quick Batch File Compiler" It is the best free batch compiler I have ever used 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