Need to deploy script, which gets deployed with system account.
To test, running the attached code and when executed as a user... works fine.
To further test, running the attached code as SYSTEM account (by running new command prompt via 'at 01:23 /interactive cmd.exe')... does not work. Results in "The syntax of the command is incorrect".
Found out the %today% variable is what's causing the problem. However, it's only a problem when running it as the SYSTEM account. Why is this??
rename C:\test.log %today%_test.log