I bought battlefield 2 off steam, and I want to have 3 or 4 installations; 1 untouched and the rest with different mods.
I want to make a batch file that has something along the lines of "Press 1 for...., 2 for.. etc"
If I do this, then I can convert the batch to an exe, rename it to BF2.exe and replace the original, therefore letting me launch different installations of BF2 while still counting them towards my play time (Rather than adding non steam shortcuts)
Well for starters what you are trying to do won't work. You can't rename a batch script to a .exe and expect it to work. Windows expects that anything with a .exe extension will be a binary executable, but yours is just a text file.
If you put an @ in front of ECHO OFF, it disables ECHO for that line.
- This is why so many batch files start with @ECHO OFF, instead of ECHO OFF followed by CLS.
- For batch files under 8 lines put @ in front of every line
- In yours it means you won't have to call CLS (Clear Screen) immediately afterwards to 'hide' the output.
- You've also left out quotes in the directory names (they have a space in them), which for CHDIR (CD) isn't a major issue as the Windows Command Prompt somewhat auto-corrects, it's still a potential cause of problems down the track.
If you make a keyboard input error it might fall through to your :NOMODS label too.
That and there's no way (within the batch file anyway) to exit it cleanly.
Batch files are freaking awesome, I used to love writing them!
The only issue with your idea that I can immediately think of is that if you verify the steam cache it might look at the 4 folders, your 'different' BF2.EXE and freak out a little.