title: date and time not saved in correct format while executing batch file
body: <p>I have below code in my batch file </p>
  
  <pre><code>echo &gt;"%temp%\%~n0.vbs" s=DateAdd("d",0,now) : d=weekday(s)
  echo&gt;&gt;"%temp%\%~n0.vbs" WScript.Echo year(s)^&amp; right(100+month(s),2)^&amp;  right(100+day(s),2)
  for /f %%a in ('cscript /nologo "%temp%\%~n0.vbs"') do set "mydate=%%a"
  set dd=%mydate:~6,2%
  set mm=%mydate:~4,2%
   set yyyy=%mydate:~0,4%
   set mytime=%time::=%
   set mytime=%mytime: =0%
   echo %dd%%mm%%yyyy%%mytime:~0,4%
   del "%temp%\%~n0.vbs" /Q
  </code></pre>
  
  <p>This code works ok i run batch file manually. But this batch file is run by Jenkins while deploying code and Jenkins runs it from c:\windows\system32
  So i get weiered output like <strong>tInpu0815</strong></p>
  
  <p>How to fix this?</p>