@Echo off


rem Script for connection to JobClient via RealVNC
set Path=\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\03-BinPublic;\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\03-BinPublic\PSTools;\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\02-BinClient;\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\01-BinServer;%Path%

set JobComputerScripts_DP=\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\90-DATA\ASML_SettingsGlobal\20-JobComputerScripts
set 01-BinServer_DP=\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\01-BinServer
set 02-BinClient_DP=\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\02-BinClient
set 03-BinPublic_DP=\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2\03-BinPublic

set S_Root_DP=\\asml.com\eu\shared\nl011072\plmjobman\JobManagerV2

rem Titelzeile schreiben


:menu
set NxCheckBox_N=NxCheckBox
set TcServer_N=tcserver
call :ViewProcess
title JS Stop Process: %NxCheckBox_N%:[\\%ComputerName%]
Echo ---------------------------------------------------------------------------
Echo Processing:
Echo  %NxCheckBox_N%
Echo.
Echo S = Stop Proces
Echo Q = Quit this Tool
Echo.
set DoNext=
set /p DoNext="your selection: "


if /i "%DoNext%" equ "S" call :StopProcess
if /i "%DoNext%" equ "Q" Exit

goto :menu

:StopProcess
 PsKill.exe -t %NxCheckBox_N% /accepteula
 PsKill.exe -t %TcServer_N% /accepteula
 call :ViewProcess
 goto :eof

:ViewProcess
 Echo --------------------------------------------------------------------------
 Pslist.exe %NxCheckBox_N% /accepteula  2>nul | findstr /I %NxCheckBox_N%
 Pslist.exe %TcServer_N% /accepteula  2>nul | findstr /I %TcServer_N%
 rem Echo --------------------------------------------------------------------------
 goto :eof



goto :Ende


























:VNCconnect
 goto :eof


:ErrExit
 call :Echo ---------------------------------------
 call :Echo Error up in:
 call :Echo %0
 call :Echo please check your Logfile
 call :Echo %Log_DPNE%
 Pause
 goto :eof

:Ende
