Batch Files to Open and Close Flight Simulator

Opening and closing the various files and ancillary programs to operate a flight simulator can be onerous and time consuming.  While there have been several programs released that enable you to launch flight simulator with a press of a key, they seldom work with complicated platforms such as flight decks. 

One of the most commonly used methods to open files and programs is to use the start menu within Windows.  However, this is not without it’s shortcomings, and specialist knowledge is required.  An easy and trouble free approach is to use batch files.

What is a Batch File

A batch file is a script file that stores commands to be executed in a serial order.  It helps automate routine tasks without requiring user input or intervention. Some common applications of batch files include loading programs, running multiple processes or performing repetitive actions in a sequence in the system.

Also known as a batch job, a batch file is a text file created in Notepad or some other text editor.  A batch file bundles or packages a set of commands into a single file in serial order.  Without a batch file these commands would have to be presented one at a time to the system from a keyboard.

Usually, a batch file is created for command sequences when a user has a repetitive need.  A command-line interpreter takes the file as an input and executes the commands in the given order.  A batch file eliminates the need to retype commands, which saves the user time and helps to avoid mistakes.  It is also useful to simplify complex processes.

Windows usually uses the .bat extension for batch files.

Whilst there are several methods that can be used to write a batch file, I have found that the examples below operate flawlessly.

Writing a Batch File

It's a simple process to write a batch file. 

Prior to beginning, it’s wise to think about the order you want the programs to open, and whether you want a pause between opening particular files and programs.  While a pause is probably not necessary, it’s a good idea as it allows a file or program to complete its opening sequence, prior to the next file or program opening.

When you have completed writing the batch file in notepad save the file with a .bat extension.  To test the batch file double click on the saved .bat extension.

Although others will disagree, I always open the MSFS-2020 or P3d and allow the program to settle before opening any batch file or other programs.

The following examples of batch files are user-specific.  You will need to substitute the file structure with the file structure you are using.

Opening Files and Programs

  • An example of a batch file to open the main flight simulator computer (server).

@Echo  off

//Alpha Main Server Computer (ALPHA-SERVER-P3)  - 09:38 - 25/08/2023

//ProSim738 V3

//ProSim Ancillary Programs

start /d "D:\Flight Simulator Files\SimStacks October 2021\SimStackSwitchv702" Switch.jar

Timeout 0.5

start /d "D:\Flight Simulator Files\FS Set Volume" FSSetvol.exe

Timeout 0.5

start /d "D:\Flight Simulator Files\SimSounds 4.0" SimSounds.exe

Timeout 1

start /d "D:\REX WeatherForce.exe

//ProSim Main Programs

start /d "D:\Flight Simulator Files\ProSim738 V3\ProSimAudio" ProsimAudio.exe

Timeout 1

start /d "D:\Flight Simulator Files\ProSim738 V3\ProSimB738" ProSimB738.exe

An example of a batch file to open the avionics suite on the second computer (client 1).

@Echo off

//Client 1 - ProSim-AR B738 Avionics Suite V3    14:07 5/09/20

//PS738 V3

//Ancillary Programs

start /d "C:\Users\user name\Documents\FSF\Programs\MSFS WideFS7" kilo

start /d "C:\Users\user name\Documents\FSF\Programs\Landing Rate Monitor" LRM.exe

start /d "C:\Users\user name\Documents\FSF\Programs\SimSounds 4.0" SimSounds.exe

//Hardware Connector

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\ProSimB738-HardwareConnector" ProSimB738-HardwareConnector.exe

//ProSim737 Displays and Indicators

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\Displays\CAPT PFD" ProsimDisplay.exe

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\Displays\CAPT ND" ProsimDisplay.exe

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\Displays\FO PFD" ProsimDisplay.exe

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\Displays\FO ND" ProsimDisplay.ex

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\Displays\EICAS" ProsimDisplay.exe

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\Displays\FLAPS" ProsimDisplay.exe

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\PS738ChronoCaptain" ProsimDisplay.exe

Timeout 3

start /d "C:\Users\user name\Documents\FSF\ProSim738 V3\ProSimIOS" ProSimIOS.exe

Closing Files and Programs

Likewise, you can also use a batch file to close files and programs sequentially or simultaneously (kill all).

An example of a batch file used to close programs on the main flight simulation computer (server).

@Echo off

//Alpha Main Server Computer (ALPHA-SERVER-P3)  - 09:38 - 25/08/2023

//ProSim738 V3 – closure batch

taskkill /IM wideclient.exe

Timeout  2

taskkill /IM ProSimAudio.exe

Timeout  1

taskkill /IM PMSounds.exe

Timeout 1

taskkill /IM Prosim737.exe

Timeout  4

taskkill /IM fs2020.exe

  • im specifies the image name of the process to be terminated (for example, PMSounds.exe or ProSim737.exe).

  • @echo on/off defines whether a name or message will be displayed on the console.  It’s also used for other tasks such a script troubleshooting.  I have used it in my batch files because I was told it was a good idea to do so, but if you don’t use the @echo command the batch file still works.  If you do use the @echo command I recommend you use @echo off as this will turn off this feature.

  • The // syntax is used to stop the line from being read by the batch file. 

In the examples, the Taskkill command has been used to close the programs.  Taskkill will cause the program to terminate gracefully, asking for confirmation if there are unsaved changes.

To forcefully kill a process, add the /F option to the command line. Be careful with the /F option as it will terminate all matching processes without confirmation.

An example using the /F command is: Taskkill /F /IM ProSimAudio.exe.

There is debate in the computer community to the validity of closing files and programs simultaneously, as ‘killing a program’ may not allow the program enough time to save information it may be saving during the closure process.

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.

Timeouts

Depending upon your computer specifications, some programs may open and close at differing speeds.  If you want a program is open or close before the next program, then a delay sequence will need to be timed into your batch file. 

The timeout command is used to trigger a delay between the programs, enabling any read/write requirements to occur prior to the next program beginning it closure routine.  The numeral denotes seconds or part thereof. 

Streamlining

Once you have created and saved the batch file, a suggestion is to create a shortcut to the file.  Doing this will enable you to make changes to the batch file such as how the file is executed (minimised or maximised), the position on the screen, colour and font style used, and whether to use an icon for easy identification.  Additionally, by creating a shortcut it enables you to place the shortcut on your task bar.

To create a shortcut, right click the batch file and save as a shortcut.

Using Batch Files and ProSim IOS

ProSim-TS IOS screen in opened to network page.  Rather than explain everything, copy the details and use trial and error to achieve your desired result

If you are using multiple computers, you may want to use the ProSim Instructor Operator Station (IOS) to trigger the opening or closure of programs (via the batch file).  When IOS is configured correctly, you will be able to open and close a batch file on one or more networked computers from one computer screen.

To configure IOS, open the network tab, select add a new action or type and select start program.  In the path to executable file on client box type the file address of the batch opening file.  Choose the start option you prefer and ensure that enabled in checked.

To close your programs, open a second action and type in to the path to executable on client box the file address of the batch closure file.

The accompanying image should be self explanatory.

There are other ways to do this, however, this method is probably the simplest.

Caveat

I am not computer technician.  I have used batch files similar to the examples shown for many years without issues.

Final Call

Batch files are but one way to minimise workload and automate the opening and closure of ancillary programs that are used with flight simulator.  The use of IOS to trigger batch files also enables the user to open and close ancillary programs from the one computer screen (instructor station).

Corruption of joy.cpl File Leading to Problems With Registration and Calibration in Windows 10

Norwegian landing showing various control surfaces that hardware devices mimic in flight simulator

Every flight simulator uses input devices, and these devices must be initially registered and calibrated in the Windows Operating System, prior to advanced calibration in ProSim737 or FSUIPC.

Occasionally, the User Interface used to register and calibrate the devices fails or crashes.  One potential reason for the interface becoming unresponsive, can be caused by Windows 10 updates, that are automatically downloaded and installed to your computer.

While most updates are benign, some will tamper with settings that otherwise were thought to be ‘set in stone’.

In this article, I’ll discuss how the corruption of the joy.cpl file can lead to problems when attempting to register and calibrate joystick controllers.

Note that I use the word input device, game controller, joystick controller, and hardware device interchangeably.  Also be aware that the joy.cpl file is used in all late Windows operating systems (XP onwards).

Background

Flight simulator uses several hardware devices.  A basic list of the most commonly used is listed below:

  • Flight controls (aileron, elevators, steering tiller, rudder).

  • Yokes (buttons and elevator trim).

  • Throttle Quadrant (buttons, flaps lever, speedbrake lever, thrust levers, cut-off levers, parking brake).

Often, but not always, the items mentioned above are connected to the computer by a Leo Bodnar Joystick Controller or Button Box card (BU0836A and BBI-64 or similar).  These cards must be registered, and the connected potentiometers calibrated in Windows, prior to more advanced calibration in ProSim737 or FSUPIC.

Registration and calibration occurs in the Windows Joystick Calibration User Interface (Game Controller Interface).

It's often easier to think of calibrating controls as a two-stage process - Primary Registration and Calibration (in Windows) and Secondary Calibration (in Prosim737, flight simulator, or FSUPIC).

Joystick Calibration User Interface displaying opening menu and calibration menu

Registration and Calibration (Primary Calibration)

By way of an example, let’s assume a yoke is being connected to the computer via a Leo Bodnar BU0836A 12-Bit Joystick Controller card.   The movement of the ailerons and elevator (potentiometers) will need to be initially registered and calibrated in Windows.

To begin the registration process, open the Joystick Calibration User Interface and follow the prompts.  During the registration and calibration process, each of the end points for the movement of the potentiometer will be recorded, and an axis assigned to the aileron and elevator.  Initial calibration of each axis then occurs.  This information is saved into a file called joy.cpl.  

Important Point:

Calibration of any axis must involve moving the hardware device as far as possible (left, right, forward or backward).  This ensures that the full range of movement from the potentiometer is recorded during the registration process. 

A .cpl file is a .DLL file that stores information for other programs to access.  It’s part of the game controller applet and creates an entry in the Windows registry.  I don’t want to dwell any longer than necessary on the Windows infrastructure, as this information is readily available from the Internet.

Handy Shortcut:

  • There are several ways that the User Interface can be accessed: press 'WIN key and R' and then type either ‘joy’ or 'joy.cpl' into the search bar.   Another way is to type ‘joy’ or 'joy.cpl' directly into the Cortana search bar (Windows 10).

Corruption of joy.cpl File.

Initially you may not realise there’s a problem, until you discover it’s not possible to calibrate a device accurately in ProSim737 or in FSUPIC.  Or, if registering a new hardware device, the registration and calibration fails.  Corruption of the joy.cpl file will usually cause the Game Controller Interface to crash.

How the joy.cpl file becomes corrupted is unknown (by me).  I’ve read that Windows updates to sound drivers can sometimes cause an issue.  However, when I recently experienced a problem when attempting to register a new joystick controller card, removing and replacing the sound drivers didn’t rectify the problem.  

The Solution

Thankfully, the solution to this problem is relatively straightforward.  The joy.cpl must be deleted and replaced with a fresh copy.  

Important Points:

  • The corruption of the joy.cpl file is one of the most common reasons for registration and calibration problems, however, it may not be the only reason.

  • While Windows 10 updates can cause corruption of the joy.cpl file, there are other reasons that may cause this file to be corrupted.

Screen grab of the Sytem32 folder showing joy.cpl file

How to Repair the joy.cpl File

Rectifying the problem is a two-part process involving deleting the  joy.cpl file and replacing it with a fresh copy (non-corrupted) copy.

The joy.cpl is located in the Windows System32 folder (C:\Windows\System32).

Each computer system is slightly different, and depending on the file’s protection status, deleting the file may be difficult.  When attempting to delete this file, always log in as Administrator.  

If the file still can’t be deleted, a standalone unlocking program will be required.  As the name suggests, this program ‘unlocks’ the file (or any other file selected) so that it can be deleted.  There are several free unlocking programs available from the Internet.  I used a program called UnLocker.

Install UnLocker to the computer and follow the prompts after which the joy.cpl file should be able to be deleted.

Next, open the SysWOW64 folder (C:\Windows\SysWOW64).  Scroll downwards and find the  file joy.cpl file.  This is a copy of the file keep by Windows.  COPY this file and paste it into the System32 file.

After this has been done, registration and calibration of any hardware device should be possible.

Important Points:

  • It’s standard practice to always make a copy of any file prior to deletion (so you can rollback if necessary).

  • Always COPY the file from the SysWOW64 folder.  NEVER cut and paste.

  • When you replace the joy.cpl file, any settings previously held in registration may no longer exist.  If this occurs, registration and calibration will need to be done again for ALL hardware devices.

Backup Configuration Settings

The file that contains the configuration settings is the joy.cpl.

This file contains the information Windows needs to be able to load the settings obtained during Primary Calibration.  This file should be backed up.

Important Point:

  • If a problem develops at some point, it's an easy matter to replace the joy.cpl file with the backed up copy.  if the problem persists, then replacement of the file (from the SysWOW64 folder may be necessary).

Although Secondary Calibration has not been addressed in this article, it's recommended to backup these settings (included for completeness).  Recommended files to backup.

  • C:\Users\Your_Name\AppData\Roaming\Lockheed Martin\Prepar3D v4\Controls\Standard.xml, controls.xml and/or joysticks.xml

  • P3Dv4\modules\FSUIPC.ini

  • Prosim737\config.xml (located in ProSim737 main system folder)

  • C:\Windows\System32\joy.cpl.

Final Call

Not being able to register a hardware device in Windows can be frustrating and time consuming.  The registration and calibration information of any hardware device is recorded in the joy.cpl file.   If this file is corrupted, initial registration and calibration of hardware devices won’t be possible.  Prior to troubleshooting elsewhere, the first point of call should be to delete the corrupted file and replace it with another copy.

Troubleshooting Power Management Settings and Solving USB Disconnects

High-speed 5 volt powered USB hub.  This hub resides in the Throttle Interface Module (TIM).  Note ferrite choke

Remember when all that was required to run flight simulator was one display monitor, joystick and a keyboard – those days are long gone.   

Depending upon the level of system complexity, a flight simulator may require a dozen or more ports to connect peripheral items to a server or client computer (s).  Historically, connection of peripherals has been via USB.  

USB is an acronym for Universal Serial Bus and, generally speaking, if only a few peripherals are attached to a computer, there usually is not a problem with communication between the computer and the attached device.  However, as interface cards and peripherals become more complicated and numerous, there is a propensity for disconnects to occur more frequently.  A USB disconnect usually announces itself by the sound card playing the ‘ding-dong’ sound as the peripheral disconnects itself from the computer.

Guidelines (golden rules)

There are several ‘golden rules’ to remember when using USB.

(i)      Try and keep all USB cables as short as possible;

(ii)     Do not join USB cables together;

(iii)    Always use quality USB cables with quality connectors;

(iv)    Do not ‘kink’ the USB cable or wrap the cable so tightly that the wires are at a 90-degree angle;

(v)     Do not lie USB cables beside one another so they are touching, but maintain some space between them;

(vi)     Use a USB cable fitted with noise limiting nodes (NLN);

(vii)    Use a USB cable/port that is rated at the highest output (USB 3 or above);

(viii)   For multi USB connections use a quality powered USB hub; and,

(ix)     Try to maintain space between USB cables and power cables.

Ferrite choke on USB cable

Noise Limiting Node (NLN)

A noise limiting node (NLN), also known as a 'ferrite choke' is a small cylindrical node that sits at each end of a USB cable.  Briefly explained the nodes are made from a solid ball of ferrite which is magnetic and therefore quite heavy.

The purpose of the NLN is to stop electromagnetic interference (EMI) transferring from the peripheral to the computer.  EMI can be produced from any number of peripheral items and a USB cable running between the peripheral and the computer acts as an antenna, picking up and transmitting EMI current.  The current can, but not necessarily always, cause havoc with either the operation of the peripheral or the computer itself.  

Adding USB Ports

As the number of add-on peripherals increase, the number of available ports falls short and additional USB ports need to be added to the computer.  Additional ports can easily be added to a computer via a PCE card which enables (on average) an additional 4 USB ports to be added to your computer.  A PCI card is attached to your motherboard.

Power Requirements

One of the main reasons that USB disconnects occur, relates to the power that is available to the computer’s USB port.  Often the power requirements of the device will be greater than that provided to the USB port; this causes a disconnect.  Additionally, depending upon your computer, it is not uncommon for power to fluctuate between USB ports as the computer’s motherboard directs power to various processes.

Depending upon how your system is set-up, when several devices 'come on line' a minor spike can be generated.  Often, this spike can momentarily exceed the amperage rating of the USB port.  This can cause a disconnect to occur.

It’s important to understand that not all USB ports are made identical.  In general, the ports on the rear of the computer are part of the computer’s motherboard; these ports are rated as high power ports.  However, USB ports that are not part of the motherboard, and usually located on the front of the computer may not receive the same power rating.  

Often a supply company will provide a computer will a dozen or so USB ports, however, to save money will choose to use what is called a ‘front panel USB header’ which has a small piece of circuitry that acts as a hub.  In this case, the power to the front panel USB is reduced.  Furthermore, it is probable that these ports may not be USB 3 and if used for a high-demand peripheral will cause a disconnects to occur.

USB Hubs

Another strong recommendation is to use a high quality powered USB hub rather than connecting several USB cables directly to a computer.  A powered hub should be used rather than an unpowered hub as the former provides its own direct power source which is usually rated at a higher amperage than the computer’s USB port.  

The interface modules that form the core of my simulation system have one or two powered hubs installed to the module.  The interface cards are then connected by very short USB cables to the hub.  A high quality USB cable (with a NLN) then connects the interface module directly to the computer.

Recommended USB Hubs:

  • The USB hubs I use are Belkin powered 5 and 7 port USB hubs (Belkin F5U237-C). The C refers to the connector on he USB cable.

Screen grab of Windows 7 PMS.  Windows 10 is similar

Windows Power Management Settings (PMS)

Not all USB peripherals will be required at all times.  Often a device will not need to communicate with the computer until something is required – such as a change to a radio frequency, an input from the control column or a key press to the MCP or CDU.

Windows has a nasty habit of ‘putting to sleep’ a USB connection that is not being used.  It does this to save power.  It is very imperative that you ensure that all power saving modes are turned off with regard to USB.  

To do this open your control panel and search for device manager.  Scroll down until you find Universal Serial Bus.  Under this tab you will find all the USB ports that you have attached to your computer.  Open each in turn and check the power management settings and ensure they are turned off.

Troubleshooting USB Disconnects

It is paramount to try and discover which peripheral is causing the disconnect.  The easiest way to troubleshoot a disconnect issue is to remove ALL the USB cables from the computer, and then one by one re-connect the cables to the allocated port and test.  Make sure you switch your computer off and on as you add each of the cables in turn.  Hopefully, you will eventually discover which cable/device is causing the issue.  The problem device will generate ‘ding dong’ if a secure connection is not possible.

If USB disconnects continue, try swapping the cables between different USB ports on the computer.  The disconnect issue maybe caused by the USB port/cable combination you are using.  As mentioned, not all USB ports have the same amount of power/amps available to them. 

Try to place peripherals that require minimal power, such as a mouse or keyboard, on lower-powered USB ports, and place more energy-requiring peripherals on powered hubs; perhaps only a few devices on the one hub.  Doing this will ensure that the hub will always have enough power (amps) to power the devices attached (cancelling out possible spikes as discussed above).  

A potential problem can be located with the USB cable, cleanliness and tightness of USB connections (including any USB hub), and loose wiring (especially if connectors have been used to secure the wiring).

Clean the USB connections with a quality cleaner to ensure cleanliness and make sure the USB connectors are tight.  If the connectors need tightening, this can easily be done by pushing the small tabs inward on the female USB connection.

Final Call

Hopefully, if you apply the above-mentioned suggestions USB disconnects will cease.  However, you will eventually reach the limit of USB capability, and at this point the use of Ethernet should be investigated to augment, or to replace the reliance on USB.

This article is but a primer.  I am not an IT expert and welcome any comments.

Handy Software to Determine Hard Drive Usage - HD Graph

Every now and again I find a program which is very handy.  We all know that flight simulator is hard drive hungry; once scenery files and other specialist files are added the hard drive can fill up very quickly.

HD Graph is a standalone program (does not need to be installed to your computer) that allows you to interrogate your hard drive to graphically display the hard disk space usage.  It shows all the directories and subdirectories of the hard drive on a single graph, allowing to see the largest directories at a glance. 

At the moment the tool is available free of charge from the HD Graph website.

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 user interface

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.

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. 

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

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).

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.

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 batch file refers to the main flight simulator computer.

  • @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, @Echooff triggers a command to prevent the command text from being visible on the 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 a typical batch file used to close programs on the main flight simulator 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.

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.

Never Do This - Changing Voltage Will Destroy Your Computer

I am using two computers networked.  I was doing some tests in an attempt to separate the sound between the two computers so I can utilize a headset when I heard a horrible grating noise coming from one of the computers.  I've heard the sound before so knew what it was; one of the fans was either failing or required lubricant in the bearing.  A little odd considering both computer are less than 3 months old.

Variable Fan Switch

The computer has a variable fan switch on the rear toward the power cord.  I lent down behind the MIP to either turn the switch to low or off in the hope of isolating the fan noise.  As I selected the switch I heard "BLIP" and the computer stopped.  I closed the other computer down, found a torch (flashlight) and peered behind the computer console.  I saw the switch, but to my horror I also saw another switch.  Sliding the computer out from behind the MIP I authenticated what I had thought.  Instead of switching the variable fan switch I has tripped the switch that changes the computer from 240 volt to 110 volt.  Both switches reside almost side by side.

Voltage

Never change a voltage switch on the rear of the a computer from your countries voltage requirement.  Depending upon which direction you move the switch and what voltage you are current on, will indicate the resultant effect.  240 V - 110 V "blip"!  110 V to 240 V "BANG" with everything "fried" beyond repair.

In some respects I was lucky, I only "fried" my power source.  A replacement was relatively easy  and I had a IT friend check the computer to ensure there were no other issues.  Oh - and the noisy fan was isolated and replaced.  It was the fan on one of the video cards (there are three video cards.  The video card was replaced under warranty.

Advice For The Future

Use a piece of tape to cover the switch so it cannot be inadvertently tripped.

Belkin Hubs - An essential Add On

 

BELKIN powered hub with external case removed

Throttle Commands Not Working

Refurbishing a throttle quadrant is not without its problems.  In an earlier post, I touched briefly on the issue of the throttle commands not responding.  The connection between flight simulator and the throttle would drop out and anything related to the throttle quadrant would cease to function.

Determining the problem was time consuming, however, the culprit was a faulty power supply that powered a Belkin USB powered hub.  The power supply I had been using was a standard computer power supply unit (PSU) and it was not new.  The PSU was overheating, and when it reached a particular temperature it would cause the powered Belkin hub to disconnect.  When the PSU returned to normal temperature (after being turned off) the Belkin hub worked perfectly.

USB Hubs - always use a powered hub

Hubs are an important piece of gear when putting together a simulator or running anything that has a lot of peripherals.  Unless you have a city of USB ports on the rear of your computer (unlikely) then you will need a hub.  Hubs are good as they minimize the number of USB cables that need to be connected to your computer.

When selecting a hub only use a powered hub. The reason being is that there is often a lot of information being transmitted, via the hub, between your device and the computer.  A powered hub helps maintain the integrity of the hub and stops information drop outs.  I only use non-powered hubs for devices such as keyboards and mouse.

Phidgets and Hubs

I learned from experience (computer crash & scrambled phidgets) that it is not a good idea to connect phidgets directly to your computer via the USB cable.  I'm not exactly sure why this is not possible, but it is recommended on the Phidget forum to always use one or two powered hubs when connecting phidgets to your computer.

Computers Ordered

I'm not a fan on computers and I'm fortunate to know a few people who can guide me through the maze of computer hardware (thanks Nat & Boyd).

Two computers are required.  One computer will be the server and this will be networked with the second computer, the client.  The server will have flight simulator installed and other add-on software, while the client computer will be dedicated to the avionics software (Sim Avionics).  The client computer will have three video graphic cards installed to enable multiple monitors that Sim Avionics require

PC's are ordered and will shortly be assembled.

Update

on 2020-07-14 13:02 by FLAPS 2 APPROACH

The computers have arrived.  WOW, these brutes look powerful and impressive.  I'll be installing flight simulator and networking them over the weekend.  Hopefully, the MIP from Flight Deck Solutions and control column from ACE Engineering will arrive soon.