Announcement

Collapse
No announcement yet.

A Scheduled task to run as the logged ON user....

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

  • A Scheduled task to run as the logged ON user....

    I have a batch file I want to run as a user on each machine. I was intending on using Hyena to setup the scheduled task on each pc on the network.

    I need the script to run AS the user that is logged on when the task runs because it uses %USERPROFILE% values in the batch file.

    Please help!

  • #2
    Re: A Scheduled task to run as the logged ON user....

    We can't think of any way to do this. WMI's Create Process might work, but its probably going to run the process under the context of the WMI process, but it's worth a try. The WMI process must be entirely non-interactive. You get to it by right clicking on a computer and selecting WMI->Create Process.

    Comment


    • #3
      Re: A Scheduled task to run as the logged ON user....

      You could use Logon or Logoff script configured through Group Policy if you have an Active Directory environment. But that is not a scheduled task, of course.
      Maybe you could modify your batch file so it runs PsLoggedOn.exe tool of Sysinternals, reads the logged on user name and then inserts it into the string to create %userprofile% variable.

      Regards,
      Milan

      Comment

      Working...
      X