Yes, that would work. Or I could have just passed the value as parameter to the script but then the scheduled task would need to be altered each time it is installed. Or the Perl script could have it hard coded but that makes updates a hassle. Or I could have a bat file to call the Perl script and that confuses people. I wrote the script for others to install and was trying to keep it simple for them. I set up the scheduled task and exported it. Then I documented how to create the environment variable and import the scheduled task, etc. Also, this variable will be useful to have available for future scripts. It worked fine for all the servers except one with no reboots needed. I'm expecting the problem to go away after rebooting since I found other problems on the server but I have to wait until Monday.