>bat into an Executable

Hi i am administrator and have written several. bat files to work with certain administrator  .exe tools, to make life simple. These programs need to be run in a specfic order. for example 1.bat->1.exe 2.bat-->2.exe!  So what i want to do is tie them all together and crete a single .exe file so when some one clicks on it does the tasks. I have no programming skills and was woundering if there is a tool that does this for me. also to add a nice icon to it ;-).  If not I guess it can be done in VB..if so i will need some direction on that.
Who is Participating?
I've used Bat.exe and unfortunatley I've never heard of a app that will do that for you.  Your best bet is to manually combine the batch files into one using Goto and Labels. Assuming the batch files flow from top to bottom not to much jumping around you just tack on to the end of the first batch file. Just make sure their are no duplicate labels i.e.





Just make sure if you change a label that it is not refernce anywhere else if so you need to change that reference also ; )

Hope this helps even though it wasn't what you wanted.


You can simply create another batch file.. then by creating a shortcut to this batch file, allows you to add a custom icon for it.
The batch file would look something like this:

@echo off
call 1.bat
call 1.exe
call 2.bat
call 2.exe

By using the "call" statements, the next program won't run, until the previous one finishes. However, if you need them to run nearly simultaneously, but just start a little bit after the other one, then you can use the 'start' command instead of 'call'. And you can get it to delay 1 second between each start, like so:

@echo off
start 1.bat
ping -n 1 localhost>nul
start 1.exe
ping -n 1 localhost>nul
start 2.bat
ping -n 1 localhost>nul
start 2.exe

Hope that helps.

mredfelixAuthor Commented:
yes i know we could do that. but i want to put all the files in to one file and then when you ran it it would run all. So the .exe would be a kind of zip file  but is an .exe which would run all off them.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

There's an old utility called bat2exe:
> There's an old utility called bat2exe
Problem with that utility, is that it only translates Batch Script into one language, then compiles it (or something with the same result); it doesn't package multiple files into one...

We need some sort of Linker application, I suppose... :o\
mredfelixAuthor Commented:
yes i just need to link the files and the result being one .exe

i guess i will have to program it? can this be done in VB.where do i start.........

ps do not post a vb tutorial because i can find that off my own back will just need the the walkthrough to linking files
No idea, in VB; however, with Java, you can use JAR (Java Archive), which allows you to very easily group multiple files into a single file, and execute them with a double-click. However, if this feature did not exist, then what I would do, would probably code it to store the 4 files you want into a multidimensional byte array. Then during execution, you can merely write these byte arrays to 4 individual files, then pass them to the Runtime.

Just an idea..?
mredfelixAuthor Commented:
no i think the program will have to be written in a program language..is it easy in java

i have a.bat which runs and then b.bat which runs with b.exe then c.bat which runs with c.exe and then d.exe runs which has a few dll filles.

so package these   using jar array is that the best?
Oh! is b.bat a compiled exe or are b and c.bat calling b and c.exe?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.