Jump to content
Sign in to follow this  
max2770

Weekend project : Startup batch files

Recommended Posts

I was getting tired of having to launch, for example, FSX, ASN, the Q400 control panel, TrackIR and my VA's ACARS everytime I want to fly, including multiple UAC permission popups - so I found a solution.

 

I made a couple of batch files (.bat), 5 of them depending on what I intend to fly, as well as a "master shutdown".  I used Bat to Exe Converter (freeware) to make executables that will ask for admin permission only once and then run everything.

 

Here's an example:

@echo off
rem ASN
cd /D E:\Program Files (x86)\HiFi\ASNext_FSX\
start ASNext.exe
rem TrackIR
cd /D C:\Program Files (x86)\NaturalPoint\TrackIR5\
start TrackIR5.exe
rem VAC
cd /D E:\Program Files (x86)\VAC Aviation\VACARS\
start VACARS.exe
rem Q400 Control Panel
cd /D E:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\mjc8q400\cpan\
start mjc84cpan.exe
rem FSX
timeout /t 5
cd /D E:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\
start fsx.exe
exit

Don't hesitate if you have questions!


sig01.png

Share this post


Link to post
Share on other sites

You can do all this FSUIPC or the EXE file in FSX but they may start the wrong way for you - I start a couple up in FSUIPC and there is the option to close them after FSX is closed

 

e.g: in the FSUIPC ini file located in modules FSX folder at the bottom:

 

[Programs]

Run1=CLOSE,C:\Users\Denis\AppData\Local\vPilot\TrafficProxy.exe

 

[Programs] may not be in your ini file just add it

Also if you want a second prog to start then change Run1 to Run2

 

Everyone does it there own way just another one to try. !!!!

All the best

Denis B

Share this post


Link to post
Share on other sites

I like the different scenario options as opposed to opening everything and having to close what I don't need!


sig01.png

Share this post


Link to post
Share on other sites

He has what he wants, it works the way he wants it to, it didn't cost him anything but some time and a couple Notepad documents, why does he need something else? Batch files are your friend. I use them all the time, I'm stoked to see someone else make use of them.

 

BTW Max, consolidate all your start-up profiles into a single batch file with a "set menu" where you press a key to make a choice and then it jumps to that particular set of commands:

 

@echo off
cls
echo.
echo.
echo     Select an option from the list below:
echo.
echo     [1]  Startup for Dash 8
echo     [2]  Startup for NGX
echo     [3]  Startup for PMDG T7
echo     [4]  Do whatever...
echo     [5]  Exit without doing anything
set /p selection=

if %selection%==1 goto dash_8
if %selection%==2 goto NGX
if %selection%==3 goto pmdg_t7
if %selection%==4 goto whatever
if %selection%==5 exit

:dash_8
rem ASN
cd /D E:\Program Files (x86)\HiFi\ASNext_FSX\
start ASNext.exe
rem TrackIR
cd /D C:\Program Files (x86)\NaturalPoint\TrackIR5\
start TrackIR5.exe
rem VAC
cd /D E:\Program Files (x86)\VAC Aviation\VACARS\
start VACARS.exe
rem Q400 Control Panel
cd /D E:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\mjc8q400\cpan\
start mjc84cpan.exe
rem FSX
timeout /t 5
cd /D E:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\
start fsx.exe
exit

:NGX
...do the NGX stuff
exit

:pmdg_t7
...do the T7 stuff
exit

:whatever
...do anything you want, change your sky textures maybe?
exit

Share this post


Link to post
Share on other sites

That's pretty cool, it has been ages since I messed around with batch files...that will be much neater than the array of icons all over my desktop!


Dave

Current System (Running at 4k): ASUS ROG STRIX X670E-F, Ryzen 7800X3D, RTX 4080, 55" Samsung Q80T, 32GB DDR5 6000 RAM, EVGA CLC 280mm AIO Cooler, HP Reverb G2, Brunner CLS-E NG Yoke, Thrustmaster Warthog HOTAS & Stick, Thrustmaster TCA Quadrant & Add-on, VirtualFly Ruddo+, TQ6+ and Yoko+, GoFlight MCP-PRO and EFIS, Skalarki FCU and MCDU

Share this post


Link to post
Share on other sites

He has what he wants, it works the way he wants it to, it didn't cost him anything but some time and a couple Notepad documents, why does he need something else? Batch files are your friend. I use them all the time, I'm stoked to see someone else make use of them.

 

BTW Max, consolidate all your start-up profiles into a single batch file with a "set menu" where you press a key to make a choice and then it jumps to that particular set of commands:

 

That's a cool tip!  I actually had some sort of thing like that with my "master shutdown", it asks "are you sure?"  Thanks for the support!  


sig01.png

Share this post


Link to post
Share on other sites

Jim, I did what you suggested, I now have my 8 options in a single program, that's amazing!  Thanks a lot!


sig01.png

Share this post


Link to post
Share on other sites

He has what he wants, it works the way he wants it to, it didn't cost him anything but some time and a couple Notepad documents, why does he need something else? Batch files are your friend. I use them all the time, I'm stoked to see someone else make use of them.

 

Because AlacrityPC is free and does that and more.

Share this post


Link to post
Share on other sites

Because AlacrityPC is free and does that and more.

 

My program is under 1kb, doesn't run at the same time as FS and works perfectly as intended.  Also, my system is good enough that I don't need to shut down services, which usually creates problems anyway.

 

I don't need more, so I don't really care if it's not the best solution, it is for me.


sig01.png

Share this post


Link to post
Share on other sites

Because AlacrityPC is free and does that and more.

Can AlacrityPC process textures with Imagetool? Can it compile BGLs with Bglcomp.exe? Can it move the finished textures and BGLs to their respective folders after compiling them? Can it make a backup of your project folders? Can it decompile a few dozen autogen files to text with AGN2TXT.exe? Can it imprint filenames on your ground textures so you can tell which landclass you're trying to match with your PR? Can it reproject and merge aerial imagery tiles with FWTools?

 

AlacrityPC cannot possibly do more than MSDOS, that's like saying AlacrityPC has more capabilities than C++.

Share this post


Link to post
Share on other sites

Put "/affinity x" in front of the .exe filenames of the programs to be executed, whereas x is one of the following values:

 

 


  • Core A = 1 = 00000001
  • Core B = 2 = 00000010
  • Core C = 4 = 00000100
  • Core D = 6 = 00001000
  • Core E = 8 = 00010000
  • Core F = 16 = 00100000
  • Core G = 32 = 01000000
  • Core H = 64 = 10000000

 

The extra tools will then be executed on the specified core, which frees up CPU cycles on core 0/A for FSX' main thread.

 

The command "start /affinity 6 TrackIR5.exe" will execute TIR on core #4.


7950X3D + 6900 XT + 64 GB + Linux | 4800H + RTX2060 + 32 GB + Linux
My add-ons from my FS9/FSX days

Share this post


Link to post
Share on other sites

Put "/affinity x" in front of the .exe filenames of the programs to be executed, whereas x is one of the following values:

 

 

 

 

The extra tools will then be executed on the specified core, which frees up CPU cycles on core 0/A for FSX' main thread.

 

The command "start /affinity 6 TrackIR5.exe" will execute TIR on core #4.

Great tip! Do I count my i7 as quad-core or I count the HT cores?


sig01.png

Share this post


Link to post
Share on other sites

I don't know. You need to experiment.

 

Process affinity can be checked in the Task Manager.


7950X3D + 6900 XT + 64 GB + Linux | 4800H + RTX2060 + 32 GB + Linux
My add-ons from my FS9/FSX days

Share this post


Link to post
Share on other sites

Put "/affinity x" in front of the .exe filenames of the programs to be executed, whereas x is one of the following values:

 

 

 

The extra tools will then be executed on the specified core, which frees up CPU cycles on core 0/A for FSX' main thread.

 

The command "start /affinity 6 TrackIR5.exe" will execute TIR on core #4.

Bjoern, the line  Core D = 6 = 00001000 should be Core D = 8 = 00001000, and from there on Core E = 16, Core F = 32, Core G = 64, Core H = 128.

6 in digital should be 00000110 and not 00001000 which is 8

 

Jean-Jacques


Jean-Jacques Struyf

between EBBR and EBCI

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...