Installing Zebra printers bu using the prndrvr.vbs script

I'm trying to install Zebra printers GK420D  on a windows 2008 R2 server. The first step is to install the driver using the following command:

cscript "c:\windows\system32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Zebra GK420d" -e  "Windows x64" -h "c:\print drivers\nicelabel printer driver\zebra\ZEBRA.inf"

I'm the following message

Unable to add printer driver Zebra GK420d Win32 error code 87

Any ideas will be highly appreciated

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Davis McCarnOwnerCommented:
The most common cause is that the name (-m) specified has to be an exact match for one of the entries in the INF file.

From this:
"I know that this is an old topic, but I had the same problem and after lots of tries I realized that the name in the parameter -m needs to be the same name found in the last lines of the .inf used in the -i parameter"
afsalehAuthor Commented:
Hi Davis,

I'm getting Unable to add printer driver Zebra GK420d Win32 error code -2146500030.

Any idea what is causing this error?

Vadim RappCommented:
Your first post was about getting error "Unable to add printer driver Zebra GK420d Win32 error code 87". Did you do some change so now it returns  -2146500030 ?
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

afsalehAuthor Commented:
This is the new query

C:\Users\ahmadsa>cscript "C:\Windows\System32\Printing_Admin_Scripts\en-US\prndr
vr.vbs" -a -m "ZEBRA GK420d" -e "Windows x64" -i "C:\Print drivers\Nicelabel Pri
nter Drivers\zebra\Zebra.inf"
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Unable to add printer driver ZEBRA GK420d Win32 error code -2146500030

Spike99On-Site IT TechnicianCommented:
Error 87 means you have an incorrect parameter.  So, it helps to look at the VBS script, prndrvr.vbs, to see examples of how to use the parameters.

One line, which starts with "const L_Help_Help_General20_Text," has this example:
"prndrvr -a -m ""driver"" -v 3 -e ""Windows IA64"" -i c:\temp\drv\drv.inf -h c:\temp\drv"

So, it appears that the "-h" parameter is the folder path, but you would want to "-i" to specify the full file path.

So, try this:
cscript "c:\windows\system32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Zebra GK420d" -e  "Windows x64" -i "c:\print drivers\nicelabel printer driver\zebra\ZEBRA.inf"


cscript "c:\windows\system32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Zebra GK420d" -e  "Windows x64" -h "c:\print drivers\nicelabel printer driver\zebra" -i "c:\print drivers\nicelabel printer driver\zebra\ZEBRA.inf"

You might also want to try adding "-v 3" before the "-e" parameter.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Spike99On-Site IT TechnicianCommented:
I downloaded the driver for the GK420d printer and the driver name, "Zebra GK420d" doesn't appear to be in the file.  If you look at the INF, the driver name for the GK420d appears in the file several times as this:    "ZDesigner GK420d"

I would try substituting that name for "Zebra GK420d" in that line.
Davis McCarnOwnerCommented:
As I already said, if the printers INF file does not have an exact match for the name of the printer, it will fail with the code 87 and code -2146500030 means the same thing.
As Alicia said, its apparently ZDesigner not Zebra.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Printers and Scanners

From novice to tech pro — start learning today.