# Task Scheduler Command Prompt - Windows 7 - Need it to run on batteries



## scrfix (May 3, 2009)

When I create a scheduled task on a laptop to run on logon from the command line it automatically selects "Start the task only if the computer is on AC Power".

I do not want this checked. I have looked through the help and searched google on this and cannot find an answer.


----------



## jat421 (Jun 14, 2008)

Look under the properties of the task under the condition tab that lets you choose the setting


----------



## Squashman (Apr 4, 2003)

jat421 said:


> Look under the properties of the task under the condition tab that lets you choose the setting


The issue he is having is he wants to set that from the command prompt in a batch file. He does realize that it can be changed by going into the GUI and un-selecting it.


----------



## jat421 (Jun 14, 2008)

Squashman said:


> The issue he is having is he wants to set that from the command prompt in a batch file. He does realize that it can be changed by going into the GUI and un-selecting it.


ahh k, I read it too quickly . Yea don't think cmd prompt can do that unless you can find where the schedule task store the settings.


----------



## Squashman (Apr 4, 2003)

I am pretty sure it can be done with VBscript and the correct Win32 api. But I am not a VB guy.


----------

