August 22, 20187 yr Hello all, I'm trying to get a batch file that will open my most used addons with one click. I read up on batch files and I'm trying make it work. After some research, I created the following: @echo off cd "F:\Program Files (x86)\HiFi\AS_P3Dv4\AS_P3Dv4" start "AS_P3Dv4.exe" cd "G:\Prepar3D v4\Modules" start "LINDA.exe" pause This above does not work at all. Can someone please tell me what I'm doing wrong? Thanks in advance! "I am the Master of the Fist!" -Akuma
August 22, 20187 yr I think you need exit at the end. Edited August 22, 20187 yr by Psybear Clayton Scott Win10 Pro x64v2004 -256GB M.2 600p | Prepar3D v5.0 hf2 -512GB M.2 960Pro | Storage -1TB 850 Pro Z270 XPower Titanium / i7-7700K @4.7GHz-H115i / 32GB Trident Z @3200MHz 14-14-14-34 GTX1070 Quicksilver (451.48) | 34W 2560x1080 | Crystal 460X-AX860i
August 22, 20187 yr May I make an unsolicited suggestion? For a couple of years I used a batch file to do exactly what you are trying (and more, swapping out fsx.cfg files, for example). Buy SimStarterNG. The fact that you are trying a batch file demonstrates your expertise and vision. SimStarterNG can do this and much more to customize your sim startup environment. Best of luck with your travels. My MSFS 2020 repaints: Flightsim.to - Profile of HStreet Working on MSFS 2024 versions.
August 22, 20187 yr The cd command will not switch between drives without the /d option: cd/d "F:\Program Files (x86)\HiFi\AS_P3Dv4\AS_P3Dv4" or alternatively, change drives with a separate discrete command F: cd "\Program Files (x86)\HiFi\AS_P3Dv4\AS_P3Dv4" The pause command will leave the command window open while the sim runs. I'd leave out the pause command. If you want to see the output of the commands, particularly errors, stream the output to a file when you run it, e.g. mybat >out.txt and then look through out.txt to review the console output. A better option might be to run Linda at P3D startup using the run= command in the FSUIPC.ini file. Regards Bob Scott | President and CEO, AVSIM Inc ATP Gulfstream II-III-IV-V Sys1 (MSFS20+24/XPlane12+11): AMD 9800X3D, water 2x240mm, MSI MPG X670E Carbon, 64GB GSkill 6000/30, nVidia RTX4090FE Alienware AW3821DW 38" 21:9 GSync, 2x4TB Crucial T705 PCIe5 + 2x2TB Samsung 990 SSD, EVGA 1000P2 PSU, 12.9" iPad Pro Thrustmaster TCA Boeing Yoke, TCA Airbus Sidestick, Twin TCA Airbus Throttle quads, PFC Cirrus Pedals, Coolermaster HAF932 case Sys2 (P3Dv5/v4): i9-13900KS, water 2x360mm, ASUS Z790 Hero, 32GB GSkill 7800MHz CAS36, ASUS RTX4090 Samsung 55" JS8500 4K TV@60Hz, 3x 2TB WD SN850X 1x 4TB Crucial P3 M.2 NVME SSD, EVGA 1600T2 PSU Fiber link to Yamaha RX-V467 Home Theater Receiver, Polk/Klipsch 6" bookshelf speakers, Polk 12" subwoofer, 12.9" iPad Pro PFC yoke/throttle quad/pedals with custom Hall sensor retrofit, Thermaltake View 71 case, Stream Deck XL button box Sys3 (DCS/P3Dv4/ATS/ETS): AMD 7800X3D, MSI MPG X870E Carbon, Noctua NH-D15S, 64GB GSkill 6000/30, EVGA RTX3090 Alienware AW3420DW 34" 21:9 GSync, Corsair HX1000i PSU, 4TB Crucial T705 PCIe5 + 2TB Samsung 970Evo Plus, TM TCA Officer Pack, Saitek combat pedals, TM Warthog, TM RS300 FF wheel/pedals, Coolermaster HAF XB case
August 22, 20187 yr 1 hour ago, Henry Street said: Buy SimStarterNG. +1, superb application. Can’t imagine simming without it now. Best regards Rupert
August 22, 20187 yr Commercial Member Hi, the "start" command doesn't exist in native DOS. It is unnecessary, every line of the batch file expects an executable or a native DOS command. "test.bat": Quote @echo off F: cd "F:\Program Files (x86)\HiFi\AS_P3Dv4\AS_P3Dv4" "F:\Program Files (x86)\HiFi\AS_P3Dv4\AS_P3Dv4\AS_P3Dv4.exe" G: cd "G:\Prepar3D v4\Modules" "G:\Prepar3D v4\Modules\LINDA.exe" pause You may not even have to change the directory first, but that depends on what the exe expects. Other methods: With P3D V3 and V4 you can add executables to an addon package and start them when the sim starts The XML would be here: "C:\Users\...\Documents\Prepar3D v4 Add-ons\MyAutoStart\add-on.xml" and look like this: Quote <?xml version="1.0" encoding="UTF-8"?> <SimBase.Document Type="AddOnXml" version="4,0" id="add-on"> <AddOn.Name>MyAutostart</AddOn.Name> <AddOn.Description>Addons to start with the sim</AddOn.Description> <AddOn.Component> <Category>EXE</Category> <Path>F:\Program Files (x86)\HiFi\AS_P3Dv4\AS_P3Dv4\AS_P3Dv4.exe</Path> </AddOn.Component><AddOn.Component><Category>EXE</Category><Path>G:\Prepar3D v4\Modules\LINDA.exe</Path></AddOn.Component></SimBase.Document> or You can add those exes to one of the exe.xml files Use some other startup tool like FSUIPC or SimStarter Best regards Edited August 22, 20187 yr by Lorby_SI LORBY-SI
August 22, 20187 yr Author Thank you all for the help! I'll do some research on SimStarter. Quick question about the app: Does it stay in memory or does it terminate after it starts the various exe? @w6kd @Lorby_SI Thank you very much for the help. I'll be working my way through both options. Much appreciated! "I am the Master of the Fist!" -Akuma
August 22, 20187 yr If you're interested, here's my batch file in Windows 7. You can try to see if it works in Win 10: @echo off start "Active Sky P3Dv4" "E:\HiFi\AS_P3Dv4\AS_P3Dv4.exe" CHOICE /N /C YN /T 13 /D Y >NUL start "FFTF Dynamic" "E:\FSPS LTD\FFTF Dynamic P3Dv4\FFTF Dynamic P3Dv4.exe" CHOICE /N /C YN /T 5 /D Y >NUL start "Enviro ATC Chat" "F:\Enviro!\Enviro!.exe" CHOICE /N /C YN /T 1 /D Y >NUL start "Prepar3D v4" "E:\Lockheed Martin\Prepar3D v4\Prepar3D.exe" It adds a pause of 13 seconds after starting ASP4, 5 secs after starting FFTF Dynamic and 1 sec.before starting P3Dv4.3. Cheers, Ed Cheers, Ed MSFS2020 Steam // Rig: Corsair Graphite 760T Full Tower - ASUS MBoard Maximus XII Hero Z490 - CPU Intel i9-10900K - 64GB RAM - MSI RTX2080 Super 8GB - [1xNVMe M.2 1TB + 1xNVMe M.2 2TB (Samsung)] + [1xSSD 1TB + 1xSSD 2TB (Crucial)] + [1xSSD 1TB (Samsung)] + 1 HDD Seagate 2TB + 1 HDD Seagate External 4TB - Monitor LG 29UC97C UWHD Curved - PSU Corsair RM1000x // Thrustmaster FCS & MS XBOX Controllers
August 22, 20187 yr It really is worth learning how to use the command line options for P3D http://www.prepar3d.com/SDKv4/sdk/add-ons/add-on_configuration_files.html You can add search directories for just about anything, as well as adding stuff to exe.xml and dll.xml, all without jerking around with xml files. Doug
August 23, 20187 yr windows 10 / Server 2012R2 adds into the mix "powershell." You could also write an auto-start method in this. We used it a lot where I work for various things. John Binner, MCDST U.S. Dept Of Veteran Affairs, Senior IT Analyst OI&T, SPM, Clinical Imaging 2022 Build: Thermaltake Core X71 Full tower case, ASUS Prime X570-P Motherboard, AMD Ryzen 7 5800X 8-Core CPU, ASUS TUF Gaming Radeon RX6900 XT GPU, G.SKILL Ripjaws 32GB DDR 3600 RAM, Thermaltake Toughpower GF1 850W 80+ Gold PSU, Cooler Master MasterLiquid ML240L Water Cooler
April 28, 20206 yr Could somebody give an example of a batch file, that starts some service apps first then launches the main program, then waits for the main exe to terminate and finally closes the service apps one by one? Thanks. Edited April 28, 20206 yr by Dirk98
April 28, 20206 yr Hello, this one starts Rex Environment Force, then Active Sky and finally P3D v4. You would need to edit the P3D path (in red) to match your installation Quote @echo cls rem Rex Environment Force cd /D G:\P3D v4\REXModules\ start rexenvforce.exe timeout /t 6 rem AS_P3Dv4 cd /D C:\Program Files (x86)\HiFi\AS_P3Dv4\ start AS_P3Dv4.exe timeout /t 4 rem P3D v4 cd /D G:\P3D v4 start Prepar3D.exe timeout /t 4 exit This one closes P3D v4, then Rex Environment Force and then Active Sky. Quote @echo cls taskkill /F /im Prepar3D.exe timeout /t 6 taskkill /F /im rexenvforce.exe timeout /t 4 taskkill /F /im AS_P3Dv4.exe timeout /t 4 exit Edited April 28, 20206 yr by Reader
Archived
This topic is now archived and is closed to further replies.