Anyone figured out how to tell if the script is running interactively on the machine?

Here is what I am doing...

Spawning a task or tasks on my machine (or a server) using a NET VIEW list to utilize PSEXEC.exe to remotely run the login script (piece) on many remote machines.

The problem is if a message box pops up and has no timeout, it could sit indefinitely (or until the machine reboots). So if I can find a way to tell if the script is running interactively or not automatically, I could handle those message boxes. [Eek!]