Results 1 to 4 of 4

Thread: Win 7 prnport.vbs Error

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Win 7 prnport.vbs Error

    I use a simple script to install network printers on remote machines. It works perfectly in XP and I'm testing in Win 7, but I keep getting a Generic Failure and I am looking for some insight. I have slightlty modified the BAT to run in Win 7. Here it is:

    @ECHO OFF


    @rem THIS COMMAND ALLOWS CSCRIPT TO RUN ARGUMENTS

    CScript//H:cscript //S


    @rem THIS COMMAND ASKS THE USER FOR THE PC VARIABLE

    set /p PC=On which PC do you want to install this printer?



    @rem THESE COMMANDS SETS THE PRINTER VARIABLES

    set IP=xxx.xxx.xxx.xxx

    set PrinterName=xx-xxxx

    set PrinterType=xxxxxxx

    set DriverPath=\\Network Share\Printers\xxxxxxxxx



    @rem THIS COMMAND DELETES THE PRINTER IF IT ALREADY EXISTS

    rundll32 printui.dll,PrintUIEntry /dl /c\\%PC% /n\\%PC%\%PrinterName% /q



    @rem THIS COMMAND INSTALLS THE PRINTER PORT

    cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_%IP% -s %PC% -h %IP% -o raw



    @ECHO .
    @ECHO .
    @ECHO .
    @ECHO Be patient...we're almost done!



    @rem THIS COMMAND INSTALLS THE PRINTER

    rundll32 printui.dll,PrintUIEntry /if /c\\%PC% /b "%PrinterName%" /f "%DriverPath%" /r "IP_%IP%" /m "%PrinterType%" /q

    @ECHO .
    @ECHO .
    @ECHO .
    @ECHO All done!
    PAUSE


    The part that fail is prnport.vbs, but I changed it to the correct directory. Please assist.

  2. #2
    Join Date
    Mar 2010
    Posts
    295

    Re: Win 7 prnport.vbs Error

    I get as a message for prnport.vbs unfortunately: the connection can not be created, Access Denied 0x80041003 prnmngr.vbs at it then states printer could not be added, error 0x80041003, the parameter is invalid. Below is the link which provides more detail on the paramater of the command line. May be due to some invalid parameter you are getting the issue.
    Prnport.vbs

  3. #3
    Join Date
    Apr 2009
    Posts
    745

    Re: Win 7 prnport.vbs Error

    You can get a bit more information on using prnport in the below link. The link shows up information on the complete syntax and options to use the same. So I will recommend you to checkout the same once. Also there are some samples available on the web through which you can build up the script properly and get a appropriate output from the same. Just download them and build your script around the same.

    Prnport.vbs

  4. #4
    Join Date
    Apr 2009
    Posts
    393

    Re: Win 7 prnport.vbs Error

    Try to first check whether spooler service is working fine or not. Try to stop it and run once again. This will surely resolve the issue. I got a similar issue on a test script. It was not working fine, but when I restarted the spooler service it worked and there is no issue with the same. Working on a ready to use script is more better because there you don't require to build up everything. You just have to modify and run the same.

Similar Threads

  1. Replies: 5
    Last Post: 04-05-2011, 10:50 AM
  2. Replies: 6
    Last Post: 12-11-2010, 11:37 PM
  3. Server Error: 451, Socket Error: 10053, Error Number: 0x800CCC0F
    By Eigenberg in forum Windows XP Support
    Replies: 3
    Last Post: 03-06-2008, 04:13 PM
  4. Replies: 3
    Last Post: 21-07-2005, 01:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,584,335.91442 seconds with 17 queries