KG200_Volker 96 Posted October 27, 2015 Share Posted October 27, 2015 I m not an expert in this and any suggestions or corrections are welcome. This is a batch file (.bat) that you can copy and use to start TrackIR and then the Simulator with one shortcut. What you have to do is copy the text below in notepad and save it as a "Whatever Name You Want.bat". Put the file wherever you want and create a shortcut from it to the desktop. If you want it to have an icon from IL2, just right click the shortcut, choose "Properties", then "Change Icon", and point to your IL2.exe, finally choose the star icon from the list. This text assumes that both IL2 and TrackIR are in C: disk, and its not a Steam version. If it is Steam version, check and correct the paths accordingly. @echo off tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 goto COMPLETE :LAUNCHIL2B start "" "C:\Program Files (x86)\IL-2 Sturmovik Battle of Stalingrad\bin\game\Il-2.exe" goto COMPLETE For those that have IL2 or TracIr in different disks. The shortcut from the batch can't point to 2 different disks. So instead of pointing to the two .exes (Il2 and TrackIr), we ll make a secondary shortcut in the same disk as one of the two programs. Example, TracIR is installed on disk C:\ , but IL2 is installed on disk F:\ Create a new shortcut where the batch file is, that points to IL2.exe, for our example I named the shortcut "IL2", and change the text to this: @echo off tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 goto COMPLETE :LAUNCHIL2B start IL2.lnk goto COMPLETE Now the last line instead of pointing to a different disk that will make the shortcut unusable, it points to another shortcut that can be set to any disk in the system. Hope that helps Link to post Share on other sites
361st_Bugsy 1190 Posted November 2, 2015 Share Posted November 2, 2015 Thanks mate Im gonna give it a try! Link to post Share on other sites
361st_Bugsy 1190 Posted November 10, 2015 Share Posted November 10, 2015 I tried this but its not seeing my IL2 exe file and I have it in the c drive standard install Link to post Share on other sites
361st_Bugsy 1190 Posted November 10, 2015 Share Posted November 10, 2015 (edited) I fixed so I thought I made sure it had the correct path but when I started it it told me that IL2 stopped working... TrackIR works fine Edited November 10, 2015 by 4./JG53_Badger Link to post Share on other sites
KG200_Volker 96 Posted November 27, 2015 Author Share Posted November 27, 2015 Il2 stooped? Weird, all the .bat does is to run the program. If you want to be sure about paths, just go to your install folder of BOS, find the "Il-2.exe" right click on it and copy the path from "Location" line and paste it in .bat file. A small addition, I had the problem that Trir takes a few seconds before it starts fully and the game was loading before this happens, so i had to quit and restart IL-2. To solve this add a delay command right beneath this line: start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" the command is this: TIMEOUT /T # The # is replaced with a number of your choice and it translates in seconds. For my PC I needed 3 sec to be sure TrIr is fully loaded before my IL2 starts, so test and find the best for you. E.G. : @echo off tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" TIMEOUT /T 3 goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 goto COMPLETE :LAUNCHIL2B start "" "C:\Program Files (x86)\IL-2 Sturmovik Battle of Stalingrad\bin\game\Il-2.exe" goto COMPLETE Link to post Share on other sites
361st_Bugsy 1190 Posted November 29, 2015 Share Posted November 29, 2015 I'll give this another try, but that last time I did what you said and it would load IL2 then it kept saying that game stopped working Link to post Share on other sites
361st_Bugsy 1190 Posted November 29, 2015 Share Posted November 29, 2015 nope still not working correctly Link to post Share on other sites
361st_Bugsy 1190 Posted November 29, 2015 Share Posted November 29, 2015 here my paths to my exe"s Any chance you can make a batch file for me and I can test it on my system. I cant figure out what Im doing worng! IL2 "C:\Program Files (x86)\1C Game Studios\IL-2 Sturmovik Battle of Stalingrad\bin\game\Il-2.exe" TrackIR5 "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" I have windows 10 Link to post Share on other sites
KG200_Volker 96 Posted December 6, 2015 Author Share Posted December 6, 2015 Sory for your trouble but I m not a programming expert. I didnt mention that this works on my Win7 and it seems that Win10 have slightly different commands. From what i managed to understand the syntax for win10 must be this (I used your paths so just copy/paste and save as .bat file): @echo off tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR cd "C:\Program Files (x86)\NaturalPoint\TrackIR5" start TrackIR5.exe goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 exit :LAUNCHIL2B cd "C:\Program Files (x86)\1C Game Studios\IL-2 Sturmovik Battle of Stalingrad\bin\game" start Il-2.exe exit If this doesn't work either try this small trick. Create a shortcut for IL-2.exe in the same folder of IL-2.exe named for our example "BOS" (that would be for your case: C:\Program Files (x86)\1C Game Studios\IL-2 Sturmovik Battle of Stalingrad\bin\game) And now use the original code but now instead of the .bat file starting IL2, it will execute the shortcut and the shortcut will start IL2. So again copy/paste e.t.c. (used your paths as before): @echo off tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 goto COMPLETE :LAUNCHIL2B start "" "C:\Program Files (x86)\1C Game Studios\IL-2 Sturmovik Battle of Stalingrad\bin\game\BOS.lnk" goto COMPLETE Now, the "BOS" shortcut can be anywhere in your system, I just used this paths for it to be easy. If you want to place it in another folder , just change the path in .bat accordingly. Link to post Share on other sites
361st_Bugsy 1190 Posted December 7, 2015 Share Posted December 7, 2015 Thanks Ill give it a go when I get home from work today! Link to post Share on other sites
361st_Bugsy 1190 Posted December 8, 2015 Share Posted December 8, 2015 Hey it worked great, Thanks again! Link to post Share on other sites
KG200_Volker 96 Posted December 9, 2015 Author Share Posted December 9, 2015 Which solution? So win10 owners can choose accordingly. Link to post Share on other sites
361st_Bugsy 1190 Posted December 10, 2015 Share Posted December 10, 2015 (edited) The first one you made for Win10. I took it one step further and dropped it in my main folder then right clicked on it and sent the shortcut to my desktop then I right clicked on the short cut and made the icon for it as my main icon from the bin folder. So now it looks just like the icon that was there before. Thanks a million bro! Edited December 10, 2015 by 4./JG53_Badger Link to post Share on other sites
Jade_Monkey 3867 Posted December 20, 2015 Share Posted December 20, 2015 Thanks for the code. I'm having issues with the second half, launching the game. It gives me the error in the image attached. I updated the paths to work with my game (different drives, TIR in E and game in X). Any suggestions? @echo offtasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe"IF ERRORLEVEL 2 GOTO NEXTPROGRAMIF ERRORLEVEL 1 GOTO LAUNCTRIR:NEXTPROGRAMgoto IL2LAUNCHER:LAUNCTRIRstart "" "E:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe"goto IL2LAUNCHER:IL2LAUNCHERtasklist /FI "IMAGENAME eq Il-2.exe" | find /i "IL-2.exe"IF ERRORLEVEL 2 GOTO NEXTPROGRAM2IF ERRORLEVEL 1 GOTO LAUNCHIL2B:NEXTPROGRAM2goto COMPLETE:LAUNCHIL2Bstart "" "X:\Steam\SteamApps\common\IL-2 Sturmovik Battle of Stalingrad\bin\game\IL-2.exe"goto COMPLETE Also, any ways we can circumvent the user persmissions popup for TrackIR? Link to post Share on other sites
ST_ami7b5 597 Posted December 21, 2015 Share Posted December 21, 2015 (edited) Just add TIR to task scheduler and set - Triggers: At log on (your account) - Action: Start a program (provide a path to your Trackir5.exe) Works like a charm for me (Win7 home premium 64) No other programming needed... Edited December 21, 2015 by ST_ami7b5 Link to post Share on other sites
KG200_Volker 96 Posted December 21, 2015 Author Share Posted December 21, 2015 (edited) Jade_Monkey, your system win7 or... Did you keep the text format in the .bat file when you copied from here? Please try to start the game directly from your .exe and see if you get the same memory error. I don't get any permissions popup, probably making trir "Run as administrator" solves it. Edited December 21, 2015 by KG200_Volker Link to post Share on other sites
Jade_Monkey 3867 Posted December 22, 2015 Share Posted December 22, 2015 Just add TIR to task scheduler and set - Triggers: At log on (your account) - Action: Start a program (provide a path to your Trackir5.exe) Works like a charm for me (Win7 home premium 64) No other programming needed... Nice one! I wasnt very familiar with the task scheduler to be honest. Jade_Monkey, your system win7 or... Did you keep the text format in the .bat file when you copied from here? Please try to start the game directly from your .exe and see if you get the same memory error. I don't get any permissions popup, probably making trir "Run as administrator" solves it. I dont get the error when running the game directly Link to post Share on other sites
GOZR 71 Posted December 22, 2015 Share Posted December 22, 2015 Assuming you only fly one simulator good stuff. will be good to add this to a shortcut of the game/Sim not Track IR Link to post Share on other sites
Samuele 0 Posted April 10, 2016 Share Posted April 10, 2016 I just want to share my version including all the previous enhancements. It's very simple and allow to start TrackIR and then Il-2 BOS, wait for Il-2 BOS to close and then close automatically TrackIR. Tested on Win 10 64 bit with steam version of the game. Here's the script, just paste in a txt file and change format as .bat Than it will work by double clicking. @echo off tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR echo Starting TrackIR... start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" TIMEOUT /T 3 goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 goto COMPLETE :LAUNCHIL2B echo Starting Il-2 cd "C:\Program Files (x86)\Steam\steamapps\common\IL-2 Sturmovik Battle of Stalingrad\bin\game" start /wait Il-2.exe TIMEOUT /T 2 echo Closing TrackIR.... Taskkill /IM TrackIR5.exe goto COMPLETE Link to post Share on other sites
56RAF_Roblex 1081 Posted September 16, 2017 Share Posted September 16, 2017 I tried Samueles script and it works a charm...except for the bit I really wanted to work, shutting down TrackiR after I come out of the program. My problem is that if I leave TrackiR running and the PC hibernates TiR gets confused and jams. Sometimes TiR being jammed also means that IL2 will lock up when I try to start it. I then have to go into Task Manager to close TiR. Link to post Share on other sites
AstroCat 20 Posted November 26, 2017 Share Posted November 26, 2017 ITAF_Samuele The script works good except it doesn't seem to close TrackIr down after you exit IL2. Any ideas? Link to post Share on other sites
56RAF_Roblex 1081 Posted November 26, 2017 Share Posted November 26, 2017 (edited) Here is what I use. It first checks if TiR is running and if it is it shut its down, waits 5 secs and restarts it and waits another 5 secs to be sure it is running before starting IL2 (I have an issue where TiR often jams if left running between game sessions) When you exit the game it shuts down TiR again (the '/f' option forces it to close). Note that I found I had to run the script with admin rights to allow it to close TiR so I made the batch file then made a shortcut to it so I could run it as Admin. @echo off Taskkill /f /IM TrackIR5.exe TIMEOUT /T 5 tasklist /FI "IMAGENAME eq TrackIR5.exe" | find /i "TrackIR5.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM IF ERRORLEVEL 1 GOTO LAUNCTRIR :NEXTPROGRAM goto IL2LAUNCHER :LAUNCTRIR echo Starting TrackIR... start "" "C:\Program Files (x86)\NaturalPoint\TrackIR5\TrackIR5.exe" TIMEOUT /T 5 goto IL2LAUNCHER :IL2LAUNCHER tasklist /FI "IMAGENAME eq Il-2.exe" | find /i "Il-2.exe" IF ERRORLEVEL 2 GOTO NEXTPROGRAM2 IF ERRORLEVEL 1 GOTO LAUNCHIL2B :NEXTPROGRAM2 goto COMPLETE :LAUNCHIL2B echo Starting Il-2 cd "C:\Program Files (x86)\1C Game Studios\IL-2 Sturmovik Battle of Stalingrad\bin\game" start /wait Il-2.exe TIMEOUT /T 2 echo Closing TrackIR.... Taskkill /f /IM TrackIR5.exe TIMEOUT /T 2 goto COMPLETE Edited November 26, 2017 by 56RAF_Roblex 1 Link to post Share on other sites
JG7_X-Man 525 Posted March 7, 2018 Share Posted March 7, 2018 I am lost - Doesn't TRACKIR start for you gents automatically? I use Win 10 and I don't see the need for this Link to post Share on other sites
KG200_Volker 96 Posted March 7, 2018 Author Share Posted March 7, 2018 (edited) Its a shortcut to run Trackir program and then run IL2, so you wont go in to the sim forgetting to run trackir first. Edited March 7, 2018 by KG200_Volker Link to post Share on other sites
JG7_X-Man 525 Posted March 8, 2018 Share Posted March 8, 2018 18 hours ago, KG200_Volker said: Its a shortcut to run Trackir program and then run IL2, so you wont go in to the sim forgetting to run trackir first. I see So you guys don't want TrackIR to start when Windows starts I take it? Link to post Share on other sites
Archie 296 Posted March 8, 2018 Share Posted March 8, 2018 My TiR3 doesn't start automatically with Win 10 for some reason, even though the box is ticked.It used to so somethings changed, maybe it's just old. Link to post Share on other sites
Blooddawn1942 722 Posted March 20, 2018 Share Posted March 20, 2018 I have my Track IR starting with windows since ages. Never needed to worry if it's active or not when starting any sim. But just putting it in autostart won't work. That's right. You need to tweak it to force Windows to run Track IR with the startup. I found a guide back then on a German tech side. But a Google research should be no problem to find a guide to force programs into the autostart I'm sure. Link to post Share on other sites
JG7_X-Man 525 Posted March 28, 2018 Share Posted March 28, 2018 1. Press the Win + R key combination; 2. Enter the following command: regedit without quotes and press the Enter key; 3. Navigate to the following path or register key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run; In the name column, you can find the application that starts automatically, when Windows boots; - Right click in the Registry Editor window and select New -> String value feature; - Add value name (the name of the application); - Add value data: enter the full path to the executable (*.exe) of the application that you wish to run at the startup Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now