Increasing the Priority of TrackIR

This is a simple tweek to Windows XP that will make your TrackIR device run much smoother.
 
 
I have had TrackIR4 for over a year now and I have always experienced a bit and sometimes a lot of stuttering and "stickiness" from time to time. With 4.1 build 30 came the famous "lap snap" problem where the view would suddenly snap to your lap when you would look away or turn your head just right. When the view would begin to stick, I often would have to use my view hat to force the view past the "sticking point." I experienced this both with my old computer as well as my new one.


The problem is solved! I was reading through a post at the NaturalPoint forum and a guy was complaining about a very similar behavior. Vincent told the guy to try upping the priority of the TrackIR.exe process. Ahhh! The light came on. That makes sense. Sure enough, that did it! It is so smooth and fluid now I just can't believe it! It's like a new piece of hardware. It seems a lot faster now too! My squaddie said the same thing. So, give it a try and see what you think. It's simple as can be to try. Just right-click on the task bar and bring up Task Manager. Find the TrackIR.exe process and right-click on it. Go down to "Set Priority" and change it from "Normal" to "AboveNormal." Simple as that. Warning: don't go above that or you'll be hitting the reset button. Also, don't try this with other processes (e.g. aceshigh.exe hee hee) as you can't just be running around changing the process priorities without bad things happening.

One negative (maybe it just bothers programmers) is changing the process priority is temporary. If you reboot your machine, the priority of TrackIR.exe goes back to "Normal." I have written a VB Script that sets the priority when you run it. Since I use FSautoStart to fire off Aces High, I simply put this program in to get started when AH does. Sweet! Works like a charm. Here is the program:

code:


'setTIRpriority.vbs -- Sets the priority of TrackIR.exe to AboveNormal
' Usage:
' setTIRpriority.vbs -- Sets priority of TrackIR.exe to "AboveNormal"
' setTIRpriority.vbs Normal -- Sets priority of TrackIR.exe to "Normal"

Const progName = "TrackIR.exe"

Const RealTime = 128
Const High = 256
Const AboveNormal = 32768
Const Normal = 32
Const BelowNormal = 16384
Const Low = 64

' Check the command line for "Normal", else set to "AboveNormal"
set args = Wscript.Arguments
If args.Count = 1 Then
priority = Normal
Else
priority = AboveNormal
End If
strComputer = "."
set objWMIService = getObject("winmgmts:\\" & strComputer & "\root\cimv2")

set colProcesses = objWMIService.ExecQuery _
("Select * From Win32_Process Where Name = '" & progName & "'")

For Each objProcess in colProcesses
objProcess.SetPriority(priority)
Next







I created a directory "C:\bin" to store little utilities like this that I write. I call this one "setTIRpriority.vbs."

To set up FSAutoStart to run the program for you, click the "Configure" button and click "Add" in the "Auto Launch the following programs after starting main app:" section. Because this is a VB Script, you can't call it directly. You have to use the Windows Command program (cmd.exe). So, in the "Program" section you will want to type this path:

C:\WINDOWS\system32\cmd.exe

In the "Command Line" field is where you tell cmd.exe to call your VB Script. Here is what you type in that field:

/c C:\bin\setTIRpriority.vbs

The "/c" tells cmd.exe to run your script.

Leave the delay set to "0" but change the "Delay before auto starting other programs:" to "10". That's plenty of time to wait before running the script.

Hope this helps you if your experiencing any sort of sluggishness with TIR.