Why thank you very much:
It seems that the error occurs during the "select * from Win32_Process" part of the function. This is running on a 64 bit OS.

-------------------------------
script:
 Code:
SETOPTION("Wow64FileRedirection","off")
CALL "ENUMPROCESS.kix"
$STICK=EnumProcess("stick.exe")
IF $STICK = 0
       RUN "C:\Program Files\Stick\Stick.exe"
ENDIF

-------------------------------
Function:

 Code:
FUNCTION EnumProcess($exe, optional $terminate, optional $Computer)
	Dim $winmgmts, $ExecQuery, $Process, $id, $getobject, $
	if not $computer $computer=@wksta endif
	$winmgmts="winmgmts:{impersonationLevel=impersonate}!//$COMPUTER"
	select
		case val($exe)>0
			$ExecQuery="select * from Win32_Process where ProcessId='$exe'"
			$GetObject=GetObject($winmgmts).ExecQuery($ExecQuery)
			For each $Process in $GetObject
				if $terminate $=$Process.Terminate endif
				$EnumProcess = $Process.name
				next
		$GetObject=''
		case vartype($exe)=8
			$ExecQuery="select * from Win32_Process where Name='$exe'"
			$GetObject=GetObject($winmgmts).ExecQuery($ExecQuery)
			For each $Process in $GetObject
				if $terminate $=$Process.Terminate endif
				$id=$Process.ProcessId
				$EnumProcess = "$Id" + "|" + "$EnumProcess"
				Next
			$EnumProcess=left($EnumProcess,len($EnumProcess)-1)
			$GetObject=''
		case 1
			exit 1
	endselect
ENDFUNCTION