Allen, thanks for some more information. Here's what I have in my current test script:

 Code:
If SessionType="RDP"
  ;Do RDP Stuff
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


Is there something I need to add/edit in order for this to work properly? As it is now the audit.exe runs no matter what I log into. I don't doubt there's something missing, but since I'm not a coder or much of a script writer I don't know what to put where.

EDIT: I guess what I need to know is how do I tell the kix script not to execute the line that runs audit.exe

EDIT: I just changed the first part of the script to the following:

 Code:
If SessionType="RDP"
  Exit
Endif


I was hoping it would exit the script and not execute the line that runs the audit.exe file, but it didn't work. I thought for sure that would do it...


Edited by Thrasonic (2015-08-27 07:29 PM)