Run your script by using wperl.exe instead of perl.exe. wperl.exe doesn't open a console ("DOS") window. The user can still kill the program through the task manager if she is quick enough, at least if the process is run as the user. You should consider running the process as a different user (like the SMS user) instead.
| [reply] |
As Corion mentioned, use wperl. Other than the situation you have, the other major usage of wperl is for GUI applications. With wperl, once you start your GUI, you can just close the console window. Otherwise in the situation where you have multiple GUI applications, you will have to leave a set of consoles open, which is really ugly.
| [reply] |
Have the script run as a windows service, which is the rough equivalent to a *nix daemon, so there is no possibility of user interaction. I have had good success with this for similar scripts. Download the "Resource Kit" from somewhere on Microsoft's site, which contains the utilities instsrv.exe and srvany.exe that allow you to install a service. There are lots of how-to documents for this procedure.
Here's one to get you started: tacktech.com
| [reply] |