Results 1 to 15 of 15

Thread: Compiling .bat into exe?

  1. #1
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default Compiling .bat into exe?

    Is there any way I could compile around, oh, 60 batch files into one exe file?
    I Googled it and didn't find anything that works.
    STOP PM'ING ME

  2. #2
    Join Date
    Oct 2007
    Location
    http://ushort.us/oqmd65
    Posts
    2,605
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    vbs.softalizer.com is this what u looking for?
    I do visit every 2-6 months

  3. #3
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Sort of...

    With that I could only convert 1 batch file to exe.
    I need all 60 to run off same exe. I could use that but then I would have to rewrite the entire layout of the files.

    Is there anyway to compile a bunch of patch files to run as exe as they would if they were plain batch.

    Like what I'm doing is creating a "Choose you own adventure story" for my infotech class.

    So this is basically how it's set up



    and it just keeps treeing out like that.
    STOP PM'ING ME

  4. #4
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    You can do this...

    Code:
    //inside batch1.bat
    echo "some stuff"
    
    if whatever
      call Batch2.bat
    Now, if you are making all of them into .exe files, replace "call" with "run Batch2.exe".


    I don't think you can combine them all into a file like you could with a JAR, though.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  5. #5
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Dang

    If I have to make the all into exe and even then they will still be separate files I might as well leave as .bat

    Thanks
    STOP PM'ING ME

  6. #6
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Its possible to make VB support .bat thingy or whatever - So maybe if i would read a few tutorials maybe i could do it. Not sure..

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    You would still need all of the batch files.


    Well, actually, its something like calling the function 'console("CMD command");', and you could wrap the different batch files in their own function.

    You could still just write in VB with Prints though, so just keep it as batches or something...
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  8. #8
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Well it doesn't matter that much.
    It's just a project with batches we're doing (Uber easy, mine has asciimation )
    But it would have been nice to compile into one executable instead of a folder full of batches.

    If I really wanted to I guess I could make it all one batch file and instead of calling the batch just to put them as gotos.... but that'd get very messy...
    STOP PM'ING ME

  9. #9
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    you could write something like this c++ source file, then compile it

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main(int argc, char** argv) {
        system("@echo off");
        system("echo hello world!");
        system("ping www.google.com");
    }
    dont know how well that would work though
    Join the Official SRL IRC channel. Learn how to Here.

  10. #10
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    I don't want to mess around too much with it yet. But thanks I'll maybe try that after though
    STOP PM'ING ME

  11. #11
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    hmm. Wouldn't it be possible to turn all of them into .exe and then bind them into 1 file or something? Not sure, but I think I've read about something like this before

    E: Although, batch phails.

  12. #12
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    No no no....


    It

    EPIC FAILS
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  13. #13
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    I have a bit of a question... Actually, two.

    1) Why go through the trouble of making 60 batch files, instead of just one?

    2) Why not just write a normal exe?

  14. #14
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    1) because it would be to muddled up

    2) because it's an assignment for school and needs to be in batch

    Putting into 1 file was for my own use
    STOP PM'ING ME

  15. #15
    Join Date
    Dec 2006
    Location
    .̿̂̔͋͗̎̆ͥ̍̒ͤ͂̾̌̀̅
    Posts
    3,012
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I think you can make a self extracting archive or something in winrar (says SFX, not sure what it really is XD) and put all the .bat's there and then go to advanced and SFX Options and put the path to extract to whatever you like and then make it run the first .bat on extraction ... Very lame, but easiest I can think of

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with compiling
    By droppeD:) in forum OSR Help
    Replies: 3
    Last Post: 01-14-2009, 09:45 PM
  2. Compiling help
    By Harbinger in forum OSR Help
    Replies: 4
    Last Post: 01-05-2009, 11:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •