GOGO,

Here is a hint on how I sometimes create complex shell/syntax commands.

using the code as an example....

first you set all of the variables.

$path = "\\GUI-SERVER\GUI"
$process = "akit.exe"

then instead of actually doing a shell command. Just print "?" the shell string, this will let you show you what the finished shell command will be, after the variables are defined.

? '%comspec% /c $path\tlist | find /i "$process" >nul'

quote:

C:\WINNT\system32\cmd.exe /c \\GUI-SERVER\GUI\tlist | find /i "akit.exe" >nul

now print the shell string from what you posted,

? '%comspec% /c "$path"tlist | find /i "$process" >nul'

quote:

C:\WINNT\system32\cmd.exe /c "\\GUI-SERVER\GUI"tlist | find /i "akit.exe" >nul

see the error in the syntax?

Bryce


------------------
kix.isorg.net