Skip to content

Issues running SetResolution.exe as a scheduled task. #11

@NabuTheWise

Description

@NabuTheWise

I'm with a school system that's trying to use your application as a scheduled task (we're trying to compensate for an issue between some classroom computers and the TV they're plugged into).

I've come across a problem running the application as a scheduled task. Originally, I thought it was an issue with running under the system account but in playing with things further, by using a local administrative account, it seems that the issue is more insidious.

For troubleshooting, I'm running a scheduled task with the following properties:

Program: CMD.EXE

Arguments: /C "C:\Program Files\SetResolution\SetREsolution.exe" SET -w 3840 -h 2160 -f 29 -noprompt > C:\TechDiv\Logs\SetResolution.log 2>&1

And that gives me the output to the log file of:

Set Resolution v0.2.1

(c) West Wind Technologies, 2022-2024

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Westwind.SetResolution.SetResolutionProcessor.SetResolution()
at Westwind.SetResolution.SetResolutionProcessor.Process()
at Westwind.SetResolution.Program.Main(String[] args)

If I instead run the following from an administrative command prompt:

"C:\Program Files\SetResolution\SetREsolution.exe" SET -w 3840 -h 2160 -f 29 -noprompt > C:\TechDiv\Logs\SetResolution.log 2>&1

I get this output:

Set Resolution v0.2.1

(c) West Wind Technologies, 2022-2024

Couldn't find a matching Display Mode.

Available Monitors

1 Generic PnP Monitor
2 Generic PnP Monitor * (Main)
3 Generic PnP Monitor

Available Display Modes (8)

1920 x 1200 *
1920 x 1080
1680 x 1050
1600 x 900
1600 x 1024
1440 x 1080
1280 x 720
1176 x 664

(And yes, I realize that this isn't a great test on my computer - I don't have the available resolutions, but it's also been failing to run on the type of stations that we ultimately want it running from.)

I'd also attempted running this as the .Net tool but the system account seemed to have trouble keeping it loaded. (I hadn't really gotten far into testing it as the tool since I'd noticed that it wasn't staying available.)

Thanks!

Nabu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions