question

testtesttesttest-7688 avatar image
0 Votes"
testtesttesttest-7688 asked LimitlessTechnology-2700 answered

Change printer properties from command line

Hello. I create local printer by commands:

 PowerShell -Command Add-PrinterPort -Name "D:\MyTestPrinter.txt"
 rundll32 printui.dll,PrintUIEntry /if /b "MyTestPrinter" /r "D:\MyTestPrinter.txt" /m "Generic / Text Only"

it's ok. But it's need to change page code for new printer (printer properties - font selection - code page) by command line or change register.
Please, help, how I can do it? Thanks!


144871-%D1%81%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA.png


windows-server-powershellwindows-server-print
снимок.png (12.6 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello @testtesttesttest-7688,

Thank you for your question and reaching out.

I believe there is no direct Windows PowerShell or cmd for this type of configuration in Printer. you can handle it by using Printer API using ESC/POS command , However its all depends Printer manufacturer

Below is Microsoft reference example for Epson ESC/POS.
https://docs.microsoft.com/en-us/windows/uwp/devices-sensors/epson-esc-pos-with-formatting




--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.