1
I need to run a task within Windows 2003 Task Scheduler however the command needs to access environment variables:
vlc.exe http://62.196.56.141:8080 --sout=#std{access=file,mux=raw,dst="C:\temp\streaming\%Date:~6,4%-%Date:~3,2%-%Date:~0,2%-RSMorning.mp3"}
While the above command will work when issued from a batch file or a command prompt, it will not expand correctly the variables when run from the Task Scheduler.
Someone would argue that this can be achieved using the CMD /C prefix, allowing the command to be launched within a command prompt, however as the task has to be forcibly terminated after a while, cmd.exe would be terminated in place of the invoked command (in this case, vlc.exe).
Any hint how to run the command without using a batch file or the command prompt, while inheriting correctly environment variables?
Are you sure you don't run into this problem?
– nixda – 2013-09-18T12:58:51.743