Okay Allen, this is weird. If I use the following it doesn't run on a local PC or a RDP session into a server:

 Code:
If SessionType="Con"
  run "\\helpdesk\TrackIt8\audit.exe /Q"
Endif

Function SessionType()

	Dim $sessionname, $session

	$sessionname = ExpandEnvironmentVars(%sessionname%)
	$session = Left($sessionname, 3)
	Select
		Case $Session = "Con"
			$sessiontype = "Console session"
		Case $session = "RDP"
			$sessiontype = "Remote desktop session"
		Case $session = "ICA"
			$sessiontype = "Citrix ICA session"
		Case 1
			$sessiontype = "Unknown session type"
	EndSelect
EndFunction


If I use the following code, slightly changed from the code above, it runs when I log into a local PC and when I log into a server via RDP.

 Code:
If SessionType="RDP"
  Exit 0
Endif

run "\\helpdesk\TrackIt8\audit.exe /Q"

Function SessionType()

	Dim $sessionname, $session

	$sessionname = ExpandEnvironmentVars(%sessionname%)
	$session = Left($sessionname, 3)
	Select
		Case $Session = "Con"
			$sessiontype = "Console session"
		Case $session = "RDP"
			$sessiontype = "Remote desktop session"
		Case $session = "ICA"
			$sessiontype = "Citrix ICA session"
		Case 1
			$sessiontype = "Unknown session type"
	EndSelect
EndFunction


I'm a bit confused. It's almost like it's doing things backwards from how I imagine it will while at the same time it either runs on everything or it runs on nothing. Very strange behavior.