none
GPO to Create Scheduled Task to run program in logged-on user environment. Windows 10

    Question

  • Good morning,

    First I will briefly explain what I want to achieve followed by my questions below.

    I need to run a program in the current logged-on user mode on all of the systems in our domain. Triggers are: whenever a user logs in, or when a network connection is made, or dropped.
    (The Application automatically changes the Proxy settings to match the location they are in)

    All of these goals can be achieved by creating 3 scheduled tasks:

    - 1. Triggered when a connection is made        (MS-Windows Network Profile service event 10000)
    - 2. Triggered when a connection is dropped    (MS-Windows Network Profile service event 10001)
    - 3. Triggered when a user logs in.

    Now here come my 2 questions:

    When I create the task on my own machine, I can select more than only run on a schedule, I need the extra options also when setting this task through GPO. So I need to be able to run my app on Event-ID: 10000 of the Microsoft -Windows-Network/profile service. How can I achieve this through GPO, if all I see is run on a schedule?

    Secondly, I would have done it all differently if I was not restricted by the fact that my APP must run in the environment of the current logged-on user. According to TechNet, this can only be achieved by creating the task through GPO.
    If I prepare the task on my own system I always have to select a user, but the user should be %username% and that is not an option.

    Anybody have some bright ideas / solutions for me?

    Thanks,

    Dylan

    Thursday, October 6, 2016 8:50 AM

Answers

  • Never mind, I found the solution, I have to create a task "Windows 7 or higher" to see the TAB with the triggers, this will help me achieve my goal, I didn't know a basic task differs from a task "Windows 7 or higher.
    • Marked as answer by Dylan Witte Thursday, October 6, 2016 10:01 AM
    Thursday, October 6, 2016 10:01 AM

All replies

  • Never mind, I found the solution, I have to create a task "Windows 7 or higher" to see the TAB with the triggers, this will help me achieve my goal, I didn't know a basic task differs from a task "Windows 7 or higher.
    • Marked as answer by Dylan Witte Thursday, October 6, 2016 10:01 AM
    Thursday, October 6, 2016 10:01 AM
  • Hi,
    I am glad that the issue is fixed. And appreciate your update and sharing the method to us. It will be greatly helpful to others who have the same problem.
    Thank you for your effort again.
    Best regards,
    Wendy

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, October 7, 2016 1:59 AM
    Moderator