cscript prndrvr.vbs Win32 error code 87 Windows XP

I am trying to force the install of a local printer driver and it fails with the message below. I have attempted this a number of ways but this was the most simple method I could use to simplify the diagnostic process. The files are located under c:\test and the .inf file name is correct. I have attempted this with the full path to the .inf file name and it gives me the same error every time. NET HELPMSG 87 gives me a result of "the parameter is incorrect"

C:\WINDOWS\system32>cscript prndrvr.vbs -a -m "TEST" -h "c:\test" -i "hpc2550c.i
nf"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Unable to add printer driver TEST Win32 error code 87

C:\WINDOWS\system32>

dsascAsked:
Who is Participating?
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.

dsascAuthor Commented:
Figured this out for myself. The printer driver must be the EXACT name of the driver. Each \ indicating folder separation must be \\


%systemroot%\system32\cscript %systemroot%\system32\prndrvr.vbs -a -m "hp color LaserJet 2550 PCL 6" -h "\\servername\\Backup\\Apps_Drivers\\Drivers\\Printers\\HP\\HPCLJ2550\\Win2KXP\\PCL6\\60.34.78.41\\" -i "\\servername\\Backup\\Apps_Drivers\\Drivers\\Printers\\HP\\HPCLJ2550\\Win2KXP\\PCL6\\60.34.78.41\\hpc2550c.inf"
EE_AutoDeleterCommented:
dsasc,
Because you have presented a solution to your own problem which may be helpful to future searches, this question is now PAQed and your points have been refunded.

EE_AutoDeleter

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
sliderwingCommented:
I am trying the below command. I do get farther than before, but still get stopped on the same error as above. I have tried with double \\ or single \. It makes no difference. Have also tried no quotes and have quotes. The path is right. It is just copied and pasted. Thanks for your help on this.
%systemroot%\system32\cscript %systemroot%\system32\prndrvr.vbs -a -m "MODEL_WA32X_RedistUnidrv,XeroxWorkCentre_Pro_7D96"  -e "Windows NT x86" -i "\\rucka7011000001110TH\\1_14th_AVN_REGT\\1_14TH\\01_BN_HQ\\4_IMO\\imo_public\\drivers\\Eng_WCP255PCL6_whql\\XRWA55XL.inf" -h "\\rucka7011000001
 
\\110TH\\1_14th_AVN_REGT\\1_14TH\\01_BN_HQ\\4_IMO\\imo_public\\drivers\\Eng_WCP255PCL6_whql\\"

Open in new window

dsascAuthor Commented:
If the file: XRWA55XL.inf it is unlikely that the name of the printer is: MODEL_WA32X_RedistUnidrv,XeroxWorkCentre_Pro_7D96. When you add the driver to the computer under the normal method, it would have a default name of XeroxWorkCentre_Pro_7D96 possibly. Just add the printer to a computer manually and see what the default printer driver name is once added and then replace "MODEL_WA32X_RedistUnidrv,XeroxWorkCentre_Pro_7D96" with the acquired default printer name.

You could also attach the contents of the XRWA55XL.inf file and I will take a look.

Please post back if you get this to work.
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
Programming

From novice to tech pro — start learning today.