Skip to content

Automated task should be created with system account instead of user #11

@FlorentBL2

Description

@FlorentBL2

When installing script is launched, it needs administrative privilege to register task. But the task is registered with user account, which is only fine if the user has permanent privilege access.
The task should be created with local system account, which ensures that the script is launched on next reboot, even if the user has no privilege by default.
AFAIU, this can be done by setting the right SID in the task XML file.

<Principal id="Author">
  <UserId>SID of Local System</UserId>
  <RunLevel>HighestAvailable</RunLevel>
</Principal>

A workaround is to edit the task manually as administrator after it is created.

Thanks for the script anyway: it rocks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions