schtasks.exe /Create /TN hello_world /SC ONEVENT /EC Security /MO *[System/EventID=4624] /TR C:\hello.vbs /RU BUILTIN\Users /DELAY 0000:10
No way to disable via commandline with schasks.exe:
Task Scheduler GUI, Conditions, Power: Start the task only if the computer is on AC power.
Create Task via GUI, export, import via commandline:
schtasks.exe /Create /TN hello_world /XML C:\hello_world.xml
http://social.technet.microsoft.com/Forums/windows/en-US/8d45efa6-a82f-4fb7-8064-77a30ec645ba/is-it-possible-to-disable-the-run-on-ac-power-using-schtasksexe-cmdline-switches?forum=w7itprogeneral
How to disable AC Power or DC power through batch script?
ReplyDeleteActually I'm creating task using batch file. plz give some suggestion how to disable the power option
This comment has been removed by the author.
ReplyDelete
ReplyDeleteeasy. create the task with the wizard, then configures everything disables AC power and then export it to XML , then edit the XML and remove the line Author and ready can use and import on any computer with the AC Off and other settings intact
ReplyDeleteeasy. create the task with the wizard, then configures everything disables AC power and then export it to XML , then edit the XML and remove the line Author and ready can use and import on any computer with the AC Off and other settings intact
ReplyDeleteeasy. create the task with the wizard, then configures everything disables AC power and then export it to XML , then edit the XML and remove the line and ready can use and import on any computer with the AC Off and other settings intact