FORUM › Forums › Software › CLS2SIM Software › How to start CLS2Sim from a Windows batch file?
- This topic has 1 reply, 1 voice, and was last updated 1 year, 3 months ago by klstvdr.
-
AuthorPosts
-
27/07/2023 at 16:28 #3178klstvdrParticipant
I want to start CLS2Sim for my CLS-E NG FORCE FEEDBACK YOKE from a Windows batch file, through which I also start other programs that are necessary for the simulation. Unfortunately this doesn’t work as expected.
I created a file named “startsim.bat” which calls CLS2Sim.exe:
C:\Users\msfs\FlightSim>type startsim.bat
start /b “C:\Program Files (x86)\Brunner Elektronik AG\CLS2Sim\CLS2Sim.exe”
echo OKWhen I call this file it merely starts a new command processor, but not CLS2Sim:
C:\Users\msfs\FlightSim>startsim
C:\Users\msfs\FlightSim>start /b “C:\Program Files (x86)\Brunner Elektronik AG\CLS2Sim\CLS2Sim.exe”
C:\Users\msfs\FlightSim>echo OK
OKC:\Users\msfs\FlightSim>Microsoft Windows [Version 10.0.19045.3208]
(c) Microsoft Corporation. All rights reserved.C:\Users\msfs\FlightSim>
If, on the other hand, I enter “C:\Program Files (x86)\Brunner Elektronik AG\CLS2Sim\CLS2Sim.exe” directly in the command line, CLS2Sim starts correctly.
How can I start CLS2Sim from a Windows batch file?
Klaus
27/07/2023 at 16:51 #3179klstvdrParticipantReplying to myself: I found a solution here: https://superuser.com/questions/198525/how-can-i-execute-a-windows-command-line-in-background.
Apparently usingstart “” “C:\Program Files (x86)\Brunner Elektronik AG\CLS2Sim\CLS2Sim.exe”
does the trick. Don’t know why the empty “” makes such a difference, but at least I can continue now.
Klaus
-
AuthorPosts
- You must be logged in to reply to this topic.