This works:
Code: Select all
SetDate := A_DD "." A_MM "." 2014
FileAppend % "Date " SetDate, % A_ScriptDir "\" "TmpDate.bat"
RunWait *RunAs "%A_ScriptDir%\TmpDate.bat"
Now I want to do the same without creating a batch file before just using cmd.exe
Code: Select all
cmdPath := A_ScriptDir "\cmd.exe"
if FileExist(cmdPath)
RunWait *RunAs "%A_ScriptDir%\cmd.exe date 10.05.2014"
Unfortunately this doesn't work.
A big thanks for your help!