monitor resolution within task started by task scheduler

timo_538 20 Reputation points
2024-03-22T07:43:37.7466667+00:00

Hello Community,

I have an issue while programs are started by the task scheduler. Within the scheduler I start MATLAB among others. During startup MATLAB is requesting the monitor resolution which is used by windows. MATLAB is getting 1024x768 and a freeware tool is showing, that no monitor is active within the task.

The task is started with my user rights and if I login manually and start the program, I get the correct monitor resolution of 1900x1080.

This issue seams to be known and there is a solution/fix for power automate. Set screen resolution on unattended mode - Power Automate | Microsoft Learn

I tried already a lot of things like installing virtual drivers, set monitor resolution within a batch script, which is executed in the task. Noting fixed the issue.

How can the monitor resolution issue be fixed?

Grateful for any help

Timo

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,618 questions
{count} votes

Accepted answer
  1. MotoX80 33,826 Reputation points
    2024-03-22T18:53:30.1266667+00:00

    Do you have the task set to "Run only when user is logged on."? The application will then run in the context of your user desktop session and should see the monitor.


1 additional answer

Sort by: Most helpful
  1. Ian Xue 37,106 Reputation points Microsoft Vendor
    2024-03-26T08:38:34.3233333+00:00

    Hi Timo,

    Thanks for your post. Before moving on, to narrow down this issue, can I know if you have tried the following two methods to set monitor resolution.

    1. With Windows registry
    2. With UIFlowService.exe.config file

    Also, there is a quick tip for task scheduler, the default user should be fine if you use an account with administrative privileges. If you want to run a Command Prompt or PowerShell command, select the "Run whether user is logged on or not" option to prevent the command window from showing up when the task runs automatically, as it's likely that using the "Hidden" option won't work.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.