Announcement

Collapse
No announcement yet.

Adding a shedule task via a logon script but run as the user

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding a shedule task via a logon script but run as the user

    Hello all,

    I need to add a shedule task via a logon scritp which isn't an issue, but I want to add the task as the user that is logged on if possible. Basically we have a auto shutdown task that kicks in at 10:00pm but I have an issue if users haven't logged off before the shutdown as it doesn't run the logoff scritp and change the permissions back to full access.

    So some how I need to add shedule task with %username%. If i add it now it uses the NT AUTHORITY \System account which the permssions arent changed for.

    Hope this makes sense????

    Cheers Simon
    Kind Regards,
    Simon

  • #2
    Re: Adding a shedule task via a logon script but run as the user

    Use schtasks.exe, the native command line Task Scheduler.
    By default, the task runs with the permissions of the user logged on to the computer running SchTasks.

    http://www.microsoft.com/resources/d....mspx?mfr=true

    If you really have to have enironmental variable expansion, consider using CPAU, a freeware utility that would allow this. It also allows for encryption of username and password information:
    http://www.joeware.net/freetools/tools/cpau/index.htm
    Documentation: http://www.joeware.net/freetools/tools/cpau/usage.htm
    Last edited by bcastner; 3rd April 2007, 16:59.
    * Users Helping Users *
    MS-MVP Windows Networking

    Comment

    Working...
    X