How do I make my own .exe file?

XxSaberxXXxSaberxX Singapore
edited July 2009 in Science & Tech
I have a couple of files spread out over different directories that I want to open regularly, one after another but it a hassle to jump in and out of folders just to open them one by one. That's why I'm wondering if there is a way to create a .exe file that opens multiple .exe/.dat files when clicked, opening them in order and maybe possibly having a time interval in between the starting of each file (one of them is a server program). If yes, how do I do it?

Comments

  • XxSaberxXXxSaberxX Singapore
    edited July 2009
    hmm...thanks for the suggestion, but I'm not looking to start the apps at every startup. it's just for convenience that if i want to start the group of apps, I was wondering if there's a way to do it with just a d-click on a personally created .exe file.
  • ThraxThrax 🐌 Austin, TX Icrontian
    edited July 2009
    You could make a batch file...
  • XxSaberxXXxSaberxX Singapore
    edited July 2009
    how to do it?
  • CBCB Ƹ̵̡Ӝ̵̨̄Ʒ Der Millionendorf- Icrontian
    edited July 2009
    You cannot create your own EXE file. EXEs have to be compiled from code, and rely on external resources. That's not what you want. Thrax has the right of it: You want a BAT file, and it's relatively easy to create.

    Open notepad, and enter a list of commands the same way you would type them in the 'Run' box from the Start menu, then save that file with a BAT extension and you're done. You can get the commands you want from looking at the properties of your shortcuts.

    Here's an example:

    I can create a Batch file that opens steam and Winamp together by creating a file that looks like this on the inside:
    G:\steam\steam.exe
    C:\programs\winamp\winamp.exe
    

    then call that file steamandwinamp.bat, and I'm done. :)
  • XxSaberxXXxSaberxX Singapore
    edited July 2009
    thanks! but there's no way to insert a timing interval between the starting of each file/program?
  • CBCB Ƹ̵̡Ӝ̵̨̄Ʒ Der Millionendorf- Icrontian
    edited July 2009
    You would use the CHOICE command. You're looking at learning batch syntax if you want to do stuff like that.

    Google "batch syntax" or "batch syntax choice" (without quotes), and read up. It looks complicated at first, but when when it comes down to it it's pretty easy to handle if you already have some experience with any other coding syntax.
  • XxSaberxXXxSaberxX Singapore
    edited July 2009
    thanks a lot! :D
  • kryystkryyst Ontario, Canada
    edited July 2009
    Another option would be to use AutoIT. It's a programing/scripting tool that allows you to make some incredibly powerful tools. The main function of it is to make handy little tools that automate things. You then compile that tool into an exe.

    So you could make a tool that opens program 1 waits 10 seconds opens program 2 etc....

    In your particular case a .bat file would work just as well. But for things more complicated AutoIt is awesome.
  • XxSaberxXXxSaberxX Singapore
    edited July 2009
    o_O
  • XxSaberxXXxSaberxX Singapore
    edited July 2009
    How do i use a .bat file to close programs then?
  • CBCB Ƹ̵̡Ӝ̵̨̄Ʒ Der Millionendorf- Icrontian
    edited July 2009
    That's not something a bat file can do, afaik.
  • kryystkryyst Ontario, Canada
    edited July 2009
    AutoIt could do that.
  • ThraxThrax 🐌 Austin, TX Icrontian
    edited July 2009
    Indeed it could.

    Run("X:\whatever.exe")
    sleep(10)
    Run("X:\whatever.exe")
    sleep(10)

    then for closing...

    Opt("WinTitleMatchMode", 2)
    WinClose("Window title")
  • MiracleManSMiracleManS Chambersburg, PA Icrontian
    edited July 2009
    CB wrote:
    That's not something a bat file can do, afaik.

    I think taskkill filename would work. Wouldn't it?
  • ThraxThrax 🐌 Austin, TX Icrontian
    edited July 2009
    Yes: taskkill /F /IM whatever.exe /T
Sign In or Register to comment.