Code: Select all
at 00:00 /interactive "echo hi"
Why does it not work?
But if:
Code: Select all
at 00:00 "cmd /c echo something > C:\something.txt"
It works.
Moderator: DosItHelp
Code: Select all
at 00:00 /interactive "echo hi"
Code: Select all
at 00:00 "cmd /c echo something > C:\something.txt"
I am not convinced it works or not as the evidence for that conclusion is missing. Try
Code: Select all
at 00:00 /interactive "echo hi &pause"
Code: Select all
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>at 15:47 /interactive "echo hi &pause"
Warning: Due to security enhancements, this task will run at the time
expected but not interactively.
Use schtasks.exe utility if interactive task is required ('schtasks /?'
for details).
Added a new job with job ID = 1
C:\Windows\system32>
Well it works, but not interactively. It is true that you can use schtasks as well to plan your tasks but there are differences.tinfanide wrote:Code: Select all
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>at 15:47 /interactive "echo hi &pause"
Warning: Due to security enhancements, this task will run at the time
expected but not interactively.
Use schtasks.exe utility if interactive task is required ('schtasks /?'
for details).
Added a new job with job ID = 1
C:\Windows\system32>
Same result.
I strongly doubt this and certainly not true for XP !shirulkar wrote:At does not automatically load Cmd.exe, the command interpreter. If you are not running an executable (.exe) file, you must explicitly load CMD at the beginning of the command e.g. cmd /c dir
Ed Dyreen wrote:I strongly doubt this and certainly not true for XP !shirulkar wrote:At does not automatically load Cmd.exe, the command interpreter. If you are not running an executable (.exe) file, you must explicitly load CMD at the beginning of the command e.g. cmd /c dir
ed
Code: Select all
c:\>at 21:54 /interactive "echo hi &pause"
Added a new job with job ID = 1
c:\>at
Status ID Day Time Command Line
----------------------------------------------------------------------
Error 1 Tomorrow 21:54 PM "echo hi &pause"
Code: Select all
cmd /c "echo hi &pause"
or
myBatch.CMD