How to create a batch .bat file or use Command Prompt to run MSTS?

 
  cityrail-rulez Chief Train Controller

I started installing all the great Australian routes, so that I can run them in OpenRails due to MSTS crashing every time I run the "Train Simulator" train.exe and doesn't come up with any errors on Windows 10

But I accidentally ran a file called "RunRoute.bat" instead of Installme.bat from the Blue Mountains route archive as I install the routes into a New Folder on my Desktop to sort out a few things before I officially put them into the MSTS/Routes folder and I now got MSTS running without any issues just by running the RunRoute.bat file.

I did noticed that I have no controls of the train I loaded up in one of the default routes since I haven't ran the Installme.bat file from the Blue Mountains route. Yet.. So I closed the Command Prompt window and I was able to gain control of the train

I must say, sorry for the caps! It was a huge SUCCESS getting the train to move and now being able to run MSTS on Windows 10 feels GREAT

What I am needing to know exactly how to write the command in Command Prompt to run MSTS in full screen mode "if possible" or to fit screen or know how to create the batch .bat file, so that I can use a .bat file to run MSTS without needing the RunRoute.bat from the Blue Mountains route

This is a breakthrough for those users such as myself who has been trying to get MSTS working on Windows 10

The sad thing is that you will be limited a selection of 640x480 16/32 1024x768 16/32 as for my laptop it gives me an extra Display Resolution of 1280x1024 16/32 not sure if this would also be the same for other users, but I currently have MSTS display resolution setup as 1024x768 32 this allows me the see the text at the bottom of the screen if your computer is set to by default 1920x1080. I do recommend you using this setting or you can use 1280x1024 16 or 32 test the settings first

This thread has been created as Sticky, because I believe it would certainly help other users to get MSTS on Windows 10 to work! It is certainly a success for me and U hope it will be for you too

Regards, Phil

Sponsored advertisement

  KRviator Moderator

Location: Up the front
I started installing all the great Australian routes, so that I can run them in OpenRails due to MSTS crashing every time I run the "Train Simulator" train.exe and doesn't come up with any errors on Windows 10

But I accidentally ran a file called "RunRoute.bat" instead of Installme.bat from the Blue Mountains route archive as I install the routes into a New Folder on my Desktop to sort out a few things before I officially put them into the MSTS/Routes folder and I now got MSTS running without any issues just by running the RunRoute.bat file.

I did noticed that I have no controls of the train I loaded up in one of the default routes since I haven't ran the Installme.bat file from the Blue Mountains route. Yet.. So I closed the Command Prompt window and I was able to gain control of the train

I must say, sorry for the caps! It was a huge SUCCESS getting the train to move and now being able to run MSTS on Windows 10 feels GREAT

What I am needing to know exactly how to write the command in Command Prompt to run MSTS in full screen mode "if possible" or to fit screen or know how to create the batch .bat file, so that I can use a .bat file to run MSTS without needing the RunRoute.bat from the Blue Mountains route

This is a breakthrough for those users such as myself who has been trying to get MSTS working on Windows 10

The sad thing is that you will be limited a selection of 640x480 16/32 1024x768 16/32 as for my laptop it gives me an extra Display Resolution of 1280x1024 16/32 not sure if this would also be the same for other users, but I currently have MSTS display resolution setup as 1024x768 32 this allows me the see the text at the bottom of the screen if your computer is set to by default 1920x1080. I do recommend you using this setting or you can use 1280x1024 16 or 32 test the settings first

This thread has been created as Sticky, because I believe it would certainly help other users to get MSTS on Windows 10 to work! It is certainly a success for me and U hope it will be for you too

Regards, Phil
cityrail-rulez
Batch files are dead simple TXT files that you can code in Notepad and have them do an awesome amount of cool things if you integrate them with other programs, or even on their own.

Can you copy the contents of the batch file here and we can see what arguments need changing. From BrianBS's Steam4Me site, I would wager there is a line of code that looks like "train.exe -mem:256" or similar. The -mem:256 is an argument (otherwise called a switch)and MSTS (and most other programs) can use them to trigger various outcomes, such as run in a window, or fullscreen, etc.

I've fonud a few different options for various MSTS arguments, but would like to see what it is asking for in the first place before just telling you to "use this one"..
  BrianBS Junior Train Controller

I started installing all the great Australian routes..........................Regards, Phil

Batch files are dead simple TXT files ...........

From BrianBS's Steam4Me site, I would wager there is a line of code that looks like "train.exe -mem:256" or similar.............................................
KRviator
KR,

I think you mean YURI's Steam4me website - my 'Short North' website (piggybacked off Yuri's site), only has rolling stock and similar files - there are NO tutorials on my site, only on Yuri's site.

BrianBS
  KRviator Moderator

Location: Up the front
From BrianBS's Steam4Me site, I would wager there is a line of code that looks like "train.exe -mem:256" or similar.............................................
KR,

I think you mean YURI's Steam4me website - my 'Short North' website (piggybacked off Yuri's site), only has rolling stock and similar files - there are NO tutorials on my site, only on Yuri's site.

BrianBS
BrianBS
Yep, and with my sincere apologies to Yuri Sos, I never fully gasped the relationship between the two of you and - until you mentioned it - had completely forgotten his name in the 10 years since I played MSTS. Embarassed
  cityrail-rulez Chief Train Controller

G'day KR,

I have copied this information from the .bat file that is helping me run MSTS on Windows 10!

@echo Hiding wire over non-electric track

@REM HIDE ROUTE'S REF FILE TO INHIBIT EDITING
@FOR %%F IN (*.noedit) DO GOTO LAUNCH

@REM HIDE THE WIRE
@HideWire

:LAUNCH

@REM RUN MSTS
@Cd ....
@"%CD%/train.exe" -vm:w /fsaa /anisotropic
  KRviator Moderator

Location: Up the front
Okayyyy..


From what I can find online @"%CD%/train.exe" -vm:w /fsaa /anisotropic is calling MSTS to run with the following options:
-vm:w : runs MSTS in a window (presumably at your native resolution)
/fsaa : Full screen Anti-Aliasing
/anisotropic : anisotropic filtering

What you can try to do is to try one of the following:

Change -vm:w to -vm:w,1024,768,16 (or whatever resolution your monitor nativaly accepts) or simply remove the -vm:w to see if MSTS will run fullscreen.

Try the following batch files, by copying the code below to Notepad and saving it as "KR's Test01.BAT" or whatever you want to name it and see how you go. Keep your existing (known-good) batch file, though, don't overwrite it for obvious reasons!

To try to run in a window at 1280x1024x32 resolution
@echo Hiding wire over non-electric track

@REM HIDE ROUTE'S REF FILE TO INHIBIT EDITING
@FOR %%F IN (*.noedit) DO GOTO LAUNCH

@REM HIDE THE WIRE
@HideWire

:LAUNCH

@REM RUN MSTS
@Cd ....
@"%CD%/train.exe" -vm:w,1280,1024,32 /fsaa /anisotropic


And to try running fullscreen
@echo Hiding wire over non-electric track

@REM HIDE ROUTE'S REF FILE TO INHIBIT EDITING
@FOR %%F IN (*.noedit) DO GOTO LAUNCH

@REM HIDE THE WIRE
@HideWire

:LAUNCH

@REM RUN MSTS
@Cd ....
@"%CD%/train.exe" /fsaa /anisotropic

Let us know how you go.Wink
  cityrail-rulez Chief Train Controller

Hi KS,

I did test a few screen resolutions as my default resolution is 1920x1080, I tested from 1280x1024 up to 1366x768 which is the same resolution was my Windows 7 laptop and MSTS works without any issues

In the MSTS menu, the maxed screen resolution is up to 1280x1024 16/32 on my Windows 10 laptop

I also removed the -vm:w command, MSTS will simply crash. Overall it's great to get it working using the HideWire from the Blue Mountains route, because there's no other way I can ever get MSTS working on Windows 10 without it even though I do have Nvidia graphics

I even tried using the Nvidia settings in the control panel to get MSTS working and failed! Unless someone who can give me the settings from their Nvidia Control Panel for MSTS working on Windows 10 would be also helpful as long as your Nvidia graphics is also a GTX 1050

Sponsored advertisement

Subscribers: KRviator

Display from: