Hi everybody,i want to check, if an application is running.
So i use the following script, wich works just fine. The programm tlist from NT res Kit does the main part.
$process = "akit.exe"
SHELL '%comspec% /c tlist | find /i "$process" >nul'
IF @ERROR = 0
?"$process is running..."
ELSE
?"$process is not running..."
ENDIF
This way, program tlist must be within the working directory.
Using a full qualified path like
SHELL '%comspec% /c \\GUI-SERVER\GUI\tlist | find /i "$process" >nul'
still works.
But i can't figure out how to change the path to a variable like
$path = "\\GUI-SERVER\GUI\"
$process = "akit.exe"
SHELL '%comspec% /c "$path"tlist | find /i "$process" >nul'
This way, tlist is not found.
What is the correct syntax for using variables within the shell command?
Any hint is appreciated!
GOGO