Windows 10: I am trying to change printer properties via python code, but constantly getting Access...

Discus and support I am trying to change printer properties via python code, but constantly getting Access... in AntiVirus, Firewalls and System Security to solve the problem; As Administrator I am running this python script on my own computer: import win32printimport win32con# Get the default printer namedefault_printer_name... Discussion in 'AntiVirus, Firewalls and System Security' started by Martin Orator, Mar 17, 2023.

  1. I am trying to change printer properties via python code, but constantly getting Access...


    As Administrator I am running this python script on my own computer: import win32printimport win32con# Get the default printer namedefault_printer_name = win32print.GetDefaultPrinter# Open the printer with the given nameprinter_handle = win32print.OpenPrinterdefault_printer_name# Get the current printer settingsproperties = win32print.GetPrinterprinter_handle, 2devmode = properties['pDevMode']# Change the printer orientation to landscapedevmode.Orientation = win32con.DMORIENT_LANDSCAPEdevmode.Scale = 1# Set the new printer settingswin32print.SetPrinterprinter_handle, 2, properties, 0#

    :)
     
    Martin Orator, Mar 17, 2023
    #1

  2. Printer Properties

    Hi Paul,

    Welcome to Microsoft Community and thank you for your interest in Windows 10.

    I suggest you to follow the below steps how to go to printer settings.

    • In the search box type “control panel”.
    • Click on “device and printers”.
    • Then you can right click on your printer and then click on properties, change accordingly.
    I suggest you to follow the below article if you face any issues with printer and check if it helps.

    http://windows.microsoft.com/en-us/windows-10/fix-printer-problems

    Hope this information was helpful and do let us know if you need further assistance. We will be glad to assist.
     
    Karthicka_R, Mar 17, 2023
    #2
  3. Can't change printer preferences in Windows 10

    Hi Chris,

    Thank you for posting your query in Microsoft community.

    I apologize for the inconvenience caused. We are glad to help you.


    • What exactly happens when you try to go into printer driver settings from Control Panel?
    I suggest you to try the steps given below and check if it helps:

    Step 1:


    • Type change default printer and hit
      enter.


    • Check whether you are able to change the preferences and properties from here.

    Step 2:


    • Type printers and scanners and hit
      enter.


    • Check whether you are able to change the preferences and properties from here.

    Hope this information helps. Do contact us for further queries. We will be happy to assist you.

    Regards,

    Jenith
     
    Jenith_James, Mar 17, 2023
    #3
  4. Boklob Win User

    I am trying to change printer properties via python code, but constantly getting Access...

    Unable to access Printer Properties since Windows 10 update on Oct 28, 2016

    No software or hardware changes have been made. I was able to access the printer properties on Oct 27th and on the 28th 3 updates were installed:

    • Update for Windows 10 Version 1607 for x64-based Systems (KB3199986)
    • Security Update for Adobe Flash Player for Windows 10 Version 1607 (for x64-based Systems) (KB3201860)
    • Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB3197954)
    On Nov 1st I did a recovery back to the recovery point for Oct 27th when I was able to access the printer properties. After the Restore I was still unable to access the printer properties.

    Since then there has been an additional Windows Update installed on Nov 9th

    • Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB3200970)
    I am still unable to access the printer properties. When I attempt to access the printer properties through devices I am getting the error message

    • c:\WINDOWS\system32\rundll32.2xe "Function address 0x1dcd0b9e caused a protection fault.(exception code 0xc0000005) Some or all property page(s) may not be displayed.
     
    Boklob, Mar 17, 2023
    #4
Thema:

I am trying to change printer properties via python code, but constantly getting Access...

Loading...
  1. I am trying to change printer properties via python code, but constantly getting Access... - Similar Threads - trying change printer

  2. I am trying to change printer properties via python code, but constantly getting Access...

    in Windows 10 Gaming
    I am trying to change printer properties via python code, but constantly getting Access...: As Administrator I am running this python script on my own computer: import win32printimport win32con# Get the default printer namedefault_printer_name = win32print.GetDefaultPrinter# Open the printer with the given nameprinter_handle =...
  3. I am trying to change printer properties via python code, but constantly getting Access...

    in Windows 10 Software and Apps
    I am trying to change printer properties via python code, but constantly getting Access...: As Administrator I am running this python script on my own computer: import win32printimport win32con# Get the default printer namedefault_printer_name = win32print.GetDefaultPrinter# Open the printer with the given nameprinter_handle =...
  4. Printer properties

    in Windows 10 Gaming
    Printer properties: I cannot find the "manage" tab in printer properties so cannot define the printer and scanner https://answers.microsoft.com/en-us/windows/forum/all/printer-properties/0b49e266-e6e2-446e-85db-d51e44e3073f
  5. Printer properties

    in Windows 10 Software and Apps
    Printer properties: I cannot find the "manage" tab in printer properties so cannot define the printer and scanner https://answers.microsoft.com/en-us/windows/forum/all/printer-properties/0b49e266-e6e2-446e-85db-d51e44e3073f
  6. I am trying to install windows 10 getting error code

    in Windows 10 Installation and Upgrade
    I am trying to install windows 10 getting error code: Hi all,I am in need of help. Its been three hours of updating my parents computer and trying to install windows 10. I have had no luck. It is giving me and error code of:0x800701B1. If you are able to help me please make the steps super easy. Or should I cut my losses and get...
  7. I am trying to load a script through python

    in Windows 10 Customization
    I am trying to load a script through python: I am trying to load a script through python and it says 'fatal error' with 'Failed to execute script- pc-optimizer' I have looked everywhere with no info,...
  8. Simple python code

    in Windows 10 Customization
    Simple python code: Hi microsoft, I have simple python 3.x code script.py: import os os.popen"pip install pillow".read when I try to call this using "python script.py" I allways get yellow color of texts in command line after the script finishes. Is that only my bug? Thank you...
  9. AM I CRAZY!!! HACKER ATTACK VIA XBOX AND PRINTER

    in AntiVirus, Firewalls and System Security
    AM I CRAZY!!! HACKER ATTACK VIA XBOX AND PRINTER: I was recently hacked on all devices and phones. Well thought it was over, I had issues printing from my work laptop to my personal printer. I go into the devices and printers and tons of crap has been added. I do have 2 Xboxs in the house and think that is what the initial...
  10. WIN keeps trying to get access to the old printer

    in Windows 10 Customization
    WIN keeps trying to get access to the old printer: I uninstalled the software for my old printer HP C4700. But Windows keeps trying to get access to this old printer. I receive the message "The feature you are trying to use is on a network resource that is unavailable." The system wants me to select a source for installation...