Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:05:09+00:00 2026-06-04T00:05:09+00:00

So I am trying to programmatically add printers, and I’m getting a 0x00000709 error.

  • 0

So I am trying to programmatically add printers, and I’m getting a 0x00000709 error.

What could cause this? I’m suspecting something in my code might be a little off:

import subprocess
def printerSetup(printer):
    subprocess.call(r'Cscript c:/windows/System32/Printing_Admin_Scripts/en-US/Prnport.vbs -a -r "' + printer + '.print.mediag.com" -h "' + printer + '.print.mediag.com" -o raw')
    if printer == 'jupiter':
        subprocess.call(r'rundll32 printui.dll, PrintUIEntry /if /b "' + str.title(printer) + '" /u /y /f w:\printers\\toshibae3511\eng\est_c2.inf /r "' + printer + '.print.mediag.com" /m "TOSHIBA e-STUDIO Color PS3"')
    elif printer == 'saturn' or printer == 'neptune':
        subprocess.call(r'rundll32 printui.dll, PrintUIEntry /if /b "' + str.title(printer) + '" /u /f w:\printers\\toshibae3511\eng\est_c2.inf /r "' + printer + '.print.mediag.com" /m "TOSHIBA e-STUDIO Color PS3"')  
    elif printer == 'mercury':
        subprocess.call(r'rundll32 printui.dll, PrintUIEntry /if /b "' + str.title(printer) + '" /u /f w:\printers\dell1720\drivers\print\dell1720\DKABJ740.inf /r "' + printer + '.print.mediag.com" /m "Dell Laser Printer 1720dn"')
    elif printer == 'sonic' or printer == 'pangea':
         subprocess.call(r'rundll32 printui.dll, PrintUIEntry /if /b "' + str.title(printer) + '" /u /f w:\printers\HPUniversalPS_x64\hpcu112v.inf /r "' + printer + '.print.mediag.com" /m "HP Universal Printing PS"')

printerList = ["neptune", "saturn", "mercury", "jupiter", "sonic", "pangea"]

for x in printerList:

    printerSetup(x)

Now each of these printers is for sure added to the network, and I am calling the print script for Windows – could it be something with my list?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:05:11+00:00Added an answer on June 4, 2026 at 12:05 am

    You have to pass a list:

    subprocess.call(['Cscript', r'c:/windows/System32/Printing_Admin_Scripts/en-US/Prnport.vbs', '-a', ...])
    

    Also check quotes…

    Take a look at http://docs.python.org/library/subprocess.html?highlight=subprocess#subprocess.check_call

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m trying to add a UIImageView programmatically using this code, as I always do:
I'm trying to programmatically add dots to a radar screen. The code runs without
I'm trying to programmatically add a series to a Dundas TreeMap but I'm getting
I am trying to programmatically add a contact in Android. Here is my code:
In this following code I intend to programmatically add two labels in each row
im trying to add a UIStepper programmatically, HEre is my code: the stepper wont
I'm getting NullPointerException when I'm trying to programmatically add inflated views to my ViewFlipper
I'm trying to add table rows programmatically following the code here /* Find Tablelayout
I need to add ValidationRule to the TextBox programmatically in WPF. I'm trying something
Trying to programmatically add options to a SELECT drop down in IE Windows Mobile.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.