E-mail Subscription

Enter your email address:

Delivered by FeedBurner

Syndicate RSS
Welcome

Mission Statement 

The purpose of FLAPS-2-APPROACH is two-fold:  To document the construction of a Boeing 737 flight simulator, and to act as a platform to share aviation-related articles pertaining to the Boeing 737; thereby, providing a source of inspiration and reference to like-minded individuals.

I am not a professional journalist.  Writing for a cross section of readers from differing cultures and languages with varying degrees of technical ability, can at times be challenging. I hope there are not too many spelling and grammatical mistakes.

 

Note:   I have NO affiliation with ANY manufacturer or reseller.  All reviews and content are 'frank and fearless' - I tell it as I see it.  Do not complain if you do not like what you read.

I use the words 'modules & panels' and 'CDU & FMC' interchangeably.  The definition of the acronym 'OEM' is Original Equipment Manufacturer (aka real aicraft part).

 

All funds are used to offset the cost of server and website hosting (Thank You...)

No advertising on this website - EVER!

 

Find more about Weather in Hobart, AU
Click for weather forecast

 

 

 

 

  FEEDBACK:  

If you see any errors or omissions, please contact me to correct the information. 

Journal Archive (Newest First)
« Replacement Genuine 737 Throttle & Center Pedestal - Full Conversion to NG Style | Main | Reference Nav Data - CDU Functionality Explained »
Tuesday
Apr092013

Batch Files & Flight-1 Program Launcher - Time Savers

Using Flight Simulator from a flight deck is not as straightforward as many may believe.  Before a flight can commence several programs must be started on two or more computers.  These programs include, but are not limited to; Flight Simulator, ProSim737 (main module, MCP, audio, instructor station, CDU & display modules), FSRAAS, Electronic Flight Bag, WideFS, PM Sounds and so on... 

Although it's not exceptionally time consuming, it does become tiresome using the mouse to activate each program, even if you have shortcuts established on the Microsoft shortcut bar. 

There are numerous methods that can be used to open programs: FSUIPC, WideFS, add on programs such as Flight-1, or a batch file.  However, many virtual pilots lack the necessary skills or confidence to successfully interpret FSUIPC or write a batch file that works the way it's supposed to.

Flight-1 Program Launcher

Flight-1 Program Launcher is a very easy program that makes starting a flight session exceptionally easy.  In two mouse clicks you can have ALL the required programs opened and ready to use.

LEFT:  Flight-1 Program Launcher interface (click to make image larger)

Simplicity

The program is standalone, meaning it can reside anywhere on your computer system and does not install into the flight simulator folder directory.  The program interface is very easy to use.

After installation you need to create a list of programs you want the launcher to open.  To do this you click the browse button on the launcher's interface and search for the executable file (.exe) of the target program, and add it to the list and save. 

You can select which program starts first, second and so forth....  When you save your preferences a small autostart.cfg file is created in the Flight-1 program folder; this is your preference list (example at left).

The Flight-1 Launcher only opens programs, it does not close them.

Flight-1 launcher - works out of the box

I've been using this nifty program for a few weeks now and have had no issues what-so-ever with it.  It works "out of the box" as designed, and best of all it's shareware!

Flight-1 Program launcher is a free add on available at Flight-1 website. 

If you would prefer you can download it directly from my site here FS Add On Downloads.

Writing Your Own Batch File

It's a simple process to bypass the above-mentioned program and write your own batch file.  If you write your own batch file you can also include a batch that closes the programs in addition to opening them.  I've outlined how to make a batch file to close programs.  The same can be done for opening programs but, with different syntax.

  1. Open Notepad ad the editor. Go to "Start" and click on "Accessories." Select "Notepad" from the menu.
  2. Find the file names of the programs you want to close. With the programs running that you want to close, right-click on the task bar and click the "Task Manager" option. Select the "Processes" tab to view a list of file names that are currently running.
  3. Use the "taskkill" command (or whatever command you wish) along with the file names you got from Task Manager. Write a separate command for each file you want to close. Each command line should look like the following example: taskkill /im filename.exe. If one of the programs you are closing is Firefox, the command line would read: taskkill /im firefox.exe.
  4. Save your new application as a .BAT file. Select "Save As" and manually type ".BAT" at the end of the file name you gave to the batch file you just created.
  5. Run the batch file. Double-click on the new application to run it. All the programs you included in the batch file should shut down properly.

A shortcut can then be made to the created file and placed into your shortcut folder.  To edit the batch file, right click the file and select edit.

The syntax required to ensure a batch file works correctly can vary between computer operating systems and your requirements.  I'd recommend a quick search on the Internet to determine the best syntax to use (Google "how to write a opening batch file").

A benefit of using a batch file is that you have to only click one button with your mouse to open or close all the programs required to operate Flight Simulator.

A typical batch file used to open programs is outlined below.  This is for the  main FS computer or server.

@Echo off
Echo. Loading software.  ALPHA MAIN COMPUTER (alpha is the name of the computer)

start /d "C:\pmSounds" pmSounds.exe
TIMEOUT 2
start /d "C:\Pro Sim\ProSim737" Prosim737.exe
TIMEOUT 9
start /d "C:\Pro Sim\ProSimMCP" ProsimMCP.exe
TIMEOUT 7
start /d "C:\Pro Sim\ProSimAudio" ProsimAudio.exe
TIMEOUT 3
start /d "C:\FsRaas20" FsRaas20.exe
TIMEOUT 2
start /d "C:\LOLA" LoLa17.exe
TIMEOUT 3
start /d "C:\FS10" fsx.exe

Another method of writing the above batch file is outlined below - although the syntax between the batch files is different the outcome is identical.

@Echo off
Echo. Loading software.  ALPHA MAIN COMPUTER
ping -n 2 127.0.0.1 >nul
start /d "C:\pmSounds" pmSounds.exe
ping -n 2 127.0.0.1 >nul
start /d "C:\Pro Sim\ProSim737" Prosim737.exe
ping -n 4 127.0.0.1 >nul
start /d "C:\Pro Sim\ProSimMCP" ProsimMCP.exe
ping -n 2 127.0.0.1 >nul
start /d "C:\Pro Sim\ProSimAudio" ProsimAudio.exe
ping -n 2 127.0.0.1 >nul
start /d "C:\FsRaas20" FsRaas20.exe
ping -n 2 127.0.0.1 >nul
start /d "C:\LOLA" LoLa17.exe
ping -n 2 127.0.0.1 >nul
start /d "C:\FS10" fsx.exe

The numeral after TIMEOUT and png -n relates to the number of seconds that must pass before the next program opens. 

For those that are curious, @Echo off triggers a command to prevent the command text from being visible on thre screen when the batch file is executed.

Closing Programs - Batch Closure File

The best method to close your simulation dependent programs is to create a closure batch file that closes each program sequentially.

Although it's a simple task to closes programs simultaneously (end processes in Windows Task Manager), there is debate in the computer community to whether killing a program straight-out is a good idea; one school of thought suggests that killing several programs simultaneous may cause problems, if a program is writing files to its file structure and not enough time is allowed for this to be completed.

For this reason, I'm hesitant to close Flight Simulator (or other programs) using a closure batch file without a timeout or delay sequence.  Needless to say, it's an easy process to configure a time delay into a batch file to create a delay before closing each program.

Time-outs

Depending upon your computer specifications some programs may open and close at differing speeds.  If you want to ensure that a program is opened or closed before the next program, then a delay sequence will need to be timed into your batch file.  There are several ways to do this and the syntax varies. 

Below is atypical batch file used to close programs on the main FS computer or server.

@Echo off
Echo. Closing software.  ALPHA MAIN COMPUTER
taskkill /im PMSounds.exe
TIMEOUT 3
taskkill /im wideclient.exe
TIMEOUT 5
taskkill /im ProSimAudio.exe
TIMEOUT 3
taskkill /im ProsimMCP.exe
TIMEOUT 5
taskkill /im Prosim737.exe
TIMEOUT 10
taskkill /im FsRaas20.exe
TIMEOUT 5
taskkill /im LoLa17.exe
TIMEOUT 5
taskkill /im FSRealTime.exe
TIMEOUT 2
taskkill /im fsx.exe

The TIMEOUT command is used to trigger a delay between the closure of the programs, ensuring that any read/write requirements are able to occur before the next program closes.  The numeral denotes seconds.  The timeout settings on this file are a little long and probably should be shortened.

IM specifies the image name of the process to be terminated.  For example, PMSounds.exe

You will note I've used Taskkill to close the programs.  Taskkill will cause the program to terminate gracefully (1), asking for confirmation if there are unsaved changes. To forcefully kill the same process, add the /F option to the command line. Be careful with the /F option as it will terminate all processes without confirmation or saving of data.

(1)  Information regarding Taskkill obtained from several Internet resources.

Variable Syntax

Differing syntax can be used within a batch file to essentially achieve the same result.   I have uploaded to this site the four batch files I have used:

  • Batch open programs - Main FS & ProSim737 computer
  • Batch close programs - Main FS & ProSim737 computer
  • Batch open programs - Avionics Computer
  • Batch close programs - Avionics computer

The files can be downloaded here (Training & Documents/FS Add On Downloads)

  • Be aware that these batch files suit my purposes and the computers I use; you may have to edit these files to take into account the programs you use, their location on your computer, and the sequence you wish the programs to open and close. 

I am NOT a computer technician.  The batch files I created for my simulator set-up have worked flawlessly and I am confident, with the correct syntax for your system, they will also work for you. 

If you are like me and tire of opening and closing several programs with a mouse, then try a batch file, or at the very least download and trial the Flight-1 Program Launcher.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>