Need help with a Bat File for Auto print task

EzTec

Distinguished
Hey everyone so recently I came across this video on youtube about creating a .bat file and setting up a Basic task in the windows task scheduler which looks like it would save me a great deal because I don't print enough to keep my toners going the way they need too.

This is the video. https://www.youtube.com/watch?v=sfEayExED3Q

The is the line written in notepad and saved as a .bat file, obviously replaceing the Printer name for your own but for some reason it's not working for me... am I missing something?
RUNDLL32 PRINTUI.DLL,PrintUIEntry /n"Your Printer Name Here" /k

Any help would be awesome! If it's any help my printer is the Epson WF-2540
 

EzTec

Distinguished


absolutely nothing... it opens the command and it just sits there... also should be noted that my printer is connected via wireless so not sure if not having a direct cable has anything to do with it but thought it should be mentioned.

 
Don't mean to be condescending, but - have you verified the name of the file you're trying to run? When you create a file in Notepad, and try to save it as 'runme.bat', it will more often than not save it as 'runme.bat.txt' automatically.

Thus, when you try to run it, and the actual extension of the file has been created (and then hidden!) as txt, it launches with notepad because it's a 'text' file.

Opening it in file explorer doesn't help - if you don't have the 'hide extensions of known file types' option UNchecked in the view folder options.

How I know this? Having to set up a bunch of autostarting VMs headless via batch files. It can be kind of frustrating. First thing I always do on my Win installations is customize the folder view to 'unprotect system files', 'show extensions for known file types'.

To access this: Control Panel -> Folder Options. Click the 'view' tab. Uncheck 'hide extensions', and then as mentioned I usually 'show hidden files/folders/drives'.
 

EzTec

Distinguished


Useful information as well but it was a print job that was stuck that was giving me issues. Thankfully it was a easy fix to force remove that print job through the cmd