Windows 10: Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges.

Discus and support Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges. in Windows 10 Software and Apps to solve the problem; I have a cpp program which creates a task that runs a command to delete a directory. The task has a few seconds delay after registration. When I run as... Discussion in 'Windows 10 Software and Apps' started by Good Man Hello, Oct 17, 2023.

  1. Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges.


    I have a cpp program which creates a task that runs a command to delete a directory. The task has a few seconds delay after registration. When I run as administrator everything goes as usual, but when I create an elevated shell using psexec -i -s cmd and attempt to run the program the task loses its delay, and any record of it in registry or the task scheduler is gone like it never existed. When I run directly from psexec using psexec -i -s something.exe I get an access denied error. The task does execute though and does what it is supposed to and the directory is deleted. Tested on both windo

    :)
     
    Good Man Hello, Oct 17, 2023
    #1

  2. Scheduled tasks run with elevated privileges can't access stored Windows credentials

    It seems that after Creators update scheduled tasks run with elevated privileges ('run with highest privileges' option) can't access stored Windows credentials. Is that a bug or an intentional change and is there a recommended workaround?

    Here's one way to reproduce the behaviour:

    • Start Credential Manger and add some Windows share credentials.
    • In a console window type 'cmdkey /list', which should list the added credentials
    • Create a task in a task manager:
      • Trigger: on user logon
      • Action: run cmd.exe
      • Tick the 'run with highest privileges' option
    • Reboot the machine and log in
    • In the console window (let's call it 'console 1') opened from the scheduled task type 'cmdkey /list'. This most likely won't display the credentials added in step 1 and properly listed in step 2. ->
      This looks like a bug
    • Now, without closing 'console 1' open another console window as an administrator (let's call it 'console 2') and type 'cmdkey /list'. This will properly list credentials added in step 1.
    • Switch to 'console 1' and type 'cmdkey /list' again. This time the credentials are listed properly, unlike in step 5. It looks like an access to Windows credentials was somehow 'unlocked' by step 6.
     
    MarcinMrowiec, Oct 17, 2023
    #2
  3. Task scheduler

    Hi,

    Thank you for posting your query in Microsoft Community.

    What error message you're getting while using Task Scheduler?

    Suggest you try the below mentioned steps to fix any issue with corrupted system files:


    • Press CTRL+Shift+ESC to open Task Manager.

    • Click File > Run New Task

    • Make sure you have a check mark beside “Create this task with administrative privileges”

    • Type CMD

    • Type or copy/paste the following commands at the CMD prompt:

      dism /online /cleanup-image /restorehealth

      sfc /scannnow
    Reboot the system and check if the issue still occurs. If the problem still persist, try to check the issue by creating other User Profile to see if problem still arises.

    Hope this will address your query.
     
    Yashwanth Kotakuri, Oct 17, 2023
    #3
  4. Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges.

    Window's Task Scheduler Not Running

    Hi,

    To assist you better, kindly provide us more details by answering the following questions:

    • Have you tried recreating the task? If so, are you getting the same issue?
    • Have you tried creating a new task?
    Meanwhile, we suggest that you ensure that the Task Scheduler is running. You can verify if the service is running by following these steps:

    • Press Windows key + R on your keyboard.
    • Type services.msc and hit Enter.
    • Under Services (Local), make sure that the Task Scheduler service's status is
      Started or Enabled.
    Should you need further assistance, feel free to get back to us.
     
    Monica Cam, Oct 17, 2023
    #4
Thema:

Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges.

Loading...
  1. Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges. - Similar Threads - Executable creating scheduled

  2. Task scheduler not executing executable file properly

    in Windows 10 Gaming
    Task scheduler not executing executable file properly: I am executing a bat file which is calling a power shell script.Power shell script is doing the below activity.Step1: It truncat the table and insert it from the file present in the server.Step2: execute the executable file.Step3: create the file and archive it in the...
  3. Task scheduler not executing executable file properly

    in Windows 10 Software and Apps
    Task scheduler not executing executable file properly: I am executing a bat file which is calling a power shell script.Power shell script is doing the below activity.Step1: It truncat the table and insert it from the file present in the server.Step2: execute the executable file.Step3: create the file and archive it in the...
  4. Task scheduler not executing executable file properly

    in Windows 10 Customization
    Task scheduler not executing executable file properly: I am executing a bat file which is calling a power shell script.Power shell script is doing the below activity.Step1: It truncat the table and insert it from the file present in the server.Step2: execute the executable file.Step3: create the file and archive it in the...
  5. Task Scheduler Task Created on Win 11 not behaving on Win 10

    in Windows 10 Gaming
    Task Scheduler Task Created on Win 11 not behaving on Win 10: Seems pretty straight forward, but maybe it is an OS or Edge issue. "C:\Program Files x86\Microsoft\Edge\Application\msedge.exe"arguments--edge-kiosk --kiosk-idle-timeout-minutes=20 --new-window --window-size=600,1000 https://fzxxxy.CCCI haven't verified the timeout yet, but...
  6. Task Scheduler Task Created on Win 11 not behaving on Win 10

    in Windows 10 Software and Apps
    Task Scheduler Task Created on Win 11 not behaving on Win 10: Seems pretty straight forward, but maybe it is an OS or Edge issue. "C:\Program Files x86\Microsoft\Edge\Application\msedge.exe"arguments--edge-kiosk --kiosk-idle-timeout-minutes=20 --new-window --window-size=600,1000 https://fzxxxy.CCCI haven't verified the timeout yet, but...
  7. Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges.

    in Windows 10 Gaming
    Executable creating a scheduled task behaves unexpectedly when running with SYSTEM privileges.: I have a cpp program which creates a task that runs a command to delete a directory. The task has a few seconds delay after registration. When I run as administrator everything goes as usual, but when I create an elevated shell using psexec -i -s cmd and attempt to run the...
  8. Task Scheduler not behaving as expected

    in Windows 10 BSOD Crashes and Debugging
    Task Scheduler not behaving as expected: That is – not as I expect it to. Maybe it’s meant to work this way, but it seems mighty odd to me – I am almost tempted to report it as a bug, but...OK, so I created a task with the following settings:Run at 00:15 every day, and repeat every 15 minutes for a period of 1...
  9. Create task in task scheduler

    in Windows 10 Customization
    Create task in task scheduler: Dear all, I need your assistant to run the following two tasks: - Shutdown the PC - Reboot the PC Is there a difference if the PC joined to the domain or not? Thank you in advacne...
  10. GPO for Scheduling Tasks not executed

    in Windows 10 Customization
    GPO for Scheduling Tasks not executed: Hello, I should make GPO to change one wallpaper at 07:00 AM and change other wallpaper at 03:00 PM. I have made two bat files. I want to execute them with schedules tasks via GPO. My DC is Windows Server 2008 R2 Standard, The client PC is Windows 10. My bat file content...