I wrote a script which I start with a batch file in the Startup directory using a batch file similar to
The ampersand suppresses the CMD windows from showing up as an empty black box, making my Perl script run in the background. Because my script does something like
my script remains always alive. The problem is that when I then try to shutdown windows, the shutdown is first delayed for about 10 seconds, then Windows complains that CMD.exe is not responding, and I have to manually kill the process by pressing the End Process button.
Are there any special tricks for terminating Perl scripts on Windowns shutdown?