Schtask /change in windows 7 to change start time without specifying a user/pw

Trying to edit the time of a schedule task (windows 7) via a batch file with schtasks

The task is set to "Run only when user is logged on"

I cant figure out anyway to use schtask /change without specifying a user/pw, which then disables that setting and sets it to run whether user is logged on or not.

When I try something like

schtasks /change /tn name /st 20:00 /rp

leaving remote pw blank.. it says "Logon failure: uknown user name or bad password"
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Have you tired the system account?
bail3yzAuthor Commented:
Yes, but then it will run whether the account is logged in or not, which is not what I want.

Seems so silly you cant edit the time without changing the credentials / the way it runs lol

I am hoping there is a solution, but I dont think there is...
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

bail3yzAuthor Commented:
Yes, it is of no help for this situation.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
I know that does not help, but it works as expected in W10.
In W7 i got it working once only by applying /IT after the /ST change  for testing here, but I cannot repeat.
Also remember schtasks is intended to work for simple tasks only - it cannot cope with the complex architecture introduced with Vista, like more than on trigger and action. So it is likely it does not work well or at all with your tasks ;-).

Probably you'll have to use a cycle of   export task - delete task - edit XML - import XML   . But doing the XML change in a batch file isn't easy, if you do not know exactly what to find and replace. PowerShell is better suited for that with its native XML support.
However, it is easy if you know the options for creating the scheduled task: Then I would just delete and recreate with new options.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bail3yzAuthor Commented:
Ya figured I would end up having to do that!

Annoying, for such a small thing!

Thanks tho!
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
I don't think a link to the schtasks cmd description should be an accepted answer. The questions hasn't been about syntax but real-life experience about what really works. So my comment should be accepted only.
In regards to Qlemo comment "but real-life experience about what really works", should be disregarded.

When working in the "field" (real life), using command tools is very useful configuring, reviewing Task scheduler settings and works.
Granted the Windows 10 interface is considerably better than previous version of the OS.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
There seems to be a misunderstanding.
I have been talking about schtasks only. My suggestion to export/delete/edit file/import, or recreate the task, are all meant to be based on that tool. No GUI required (but could be used instead).
OK I misunderstood your comment.
The later GUI's are excellent for the operations mentioned in your post.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
task scheduler

From novice to tech pro — start learning today.