OK - Now I need two 19" widescreens! ;\)

Since you can't put it down, here's a few more ideas...

 Code:
	Shell "%Comspec% /c for /f %%A in ('csccmd /IsEnabled') DO @If /i '%%A'=='Enabled' (echo.>" + $Temp + "\Offline.flg)"

can probably be shortened to
 Code:
  Shell '%Comspec% /c csccmd /IsEnabled' | find.exe /i "Enabled"'
  If @ERROR ; text not found - not enabled - exit?

The last command from a Shell command will set the error macro. You can use this to check results. The Find command searches for "Enabled" in the output of csccmd, and returns 0 if found, 1 if not. No temp file to deal with.

You might also want to look at the WSHPipe UDF. I insert parts of that code into lots of my code to capture STDOUT instead of using temp files. Since all the output is returned to Kix, you can probably eliminate that "double-wide-screen" embedded batch file and use Kix to process the results and create the log, too.

Good idea making the UDF silent, too. Was thinking about that, earlier. Glad the telepathy worked!

BTW - no need to credit us unless we start co-writing the code. We will all throw ideas out pretty freely around here!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D