cscript prndrvr.vbs Win32 error code 87 Windows XP

dsasc
dsasc used Ask the Experts™
on
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>

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

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"
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
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

Author

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.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial