Cant't trigger printing with Task Scheduler

PrzG 20 Reputation points
2023-10-20T09:47:55.12+00:00

Hi. My Task Scheduler isn't working. I've prepared a file to print every 3 days so that my printer nozzles don't go clogged because I'm tired of cleaning them. Calling the command mspaint /p C:...\czyszczenie_glowicy.png from the PowerShell console triggers printing normally. In the scheduler, unfortunately, it does not work, neither scheduled to execute automatically nor called manually.

I tried moving the czyszczenie_glowicy.png file to different folders starting from the parent directory, with no success - the file still cannot be found:

blad

I also tried various combinations with closing the path or the whole parameter in quotes.

I was directed here from the Polish Microsoft Answers forum.

I don't have any idea about this problem anymore. I would appreciate some suggestions. This is how the task is configured:

kurde_nie_dziala

Many thanks in advance!

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 36,401 Reputation points
    2023-10-20T14:14:07.2333333+00:00

    Looks like you will need to specify the full path to the executable. I found it in the WindowsApps folder under my user account.

    c:\>dir mspaint.exe /b /s
    c:\Users\motox80\AppData\Local\Microsoft\WindowsApps\mspaint.exe
    
    
    

    You might also want to consider using Powershell. I found this script.

    http://monadblog.blogspot.com/2006/02/msh-print-image.html


0 additional answers

Sort by: Most 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.