http://qs321.pair.com?node_id=1216251


in reply to Re: [OT] Environment variable missing for scheduled task in Windows Server 2008
in thread [OT] Environment variable missing for scheduled task in Windows Server 2008

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.

  • Comment on Re^2: [OT] Environment variable missing for scheduled task in Windows Server 2008

Replies are listed 'Best First'.
Re^3: [OT] Environment variable missing for scheduled task in Windows Server 2008
by trwww (Priest) on Jun 16, 2018 at 16:22 UTC

    Did the reboot work? I guess personally I prefer config files to using the environment for this stuff.

    EDIT: ah I see it did work. Good stuff