Hello, I'm trying to create a Scheduled Task under Windows Server 2003 R2 with this config:

        <programArguments>--mode unattended --unattendedmodebehavior download</programArguments>
        <progressText>add scheduled task ${taskName}</progressText>
        <runAs>NT AUTHORITY\SYSTEM</runAs>

after installation the task is created with the current user and not with the system account. Install logfile:

add scheduled task nahar updater
password cannot be blank
Unable to create scheduled task nahar updater

I hope you guys can help me. Thanks! Martin

asked 19 Jun '12, 07:06

Martin%20Pecuch's gravatar image

Martin Pecuch
accept rate: 0%

The issue is that the mstask API returns that access is denied to use the <runas> account and registers the task to be run as current user.

It is not possible to create a scheduled task to run as SYSTEM user.


answered 19 Jun '12, 07:45

wojciechka's gravatar image

wojciechka ♦♦
accept rate: 26%

With schtasks ist this possible: http://support.microsoft.com/kb/814596

schtasks /create /tn test /tr "c:\Program Files\Gekko\nahar\autoupdate-windows.exe --mode unattended --unattendedmodebehavior download" /du 0024:00 /ru System /ri 60 /sc daily
(19 Jun '12, 08:45) Martin Pecuch

Indeed. It seems the only option then is to use <runProgram> and schedule it manually:

  <programArguments>/create /tn "${taskName}" /tr "${installdir}/autoupdate-windows.exe --mode unattended --unattendedmodebehavior download" /du 0024:00 /ru System /ri 60 /sc daily</programArguments>
(19 Jun '12, 10:08) wojciechka ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 19 Jun '12, 07:06

Seen: 3,015 times

Last updated: 19 Jun '12, 10:09