prndrvr.vbs "Generic Failure"

M

Mark Feodoroff

Hi All,

I'm using prndrvr.vbs to remove old printer drivers from remote PCs.
I've tested it from a command line and it works perfectly, and new drivers
are automatically installed.
The problem is that when I run a vb script which in turn calls prndrvr.vbs,
I get the following error:

"Unable to delete printer driver HP LaserJet 5M Error 0x80041001 Generic
failure"

The code that calls prndrvr looks like this:

wshShell.Run "%COMSPEC% /c cscript.exe c:\windows\system32\prndrvr.vbs -d -m
" _
& Chr(34) & "HP LaserJet 5M" & Chr(34) & " -v 3 -e " & Chr(34)_
& "Windows NT x86" & Chr(34) & " -s " & strComputer & ">" & TempFile, 0,
True

Can I run prndrvr from within another vb script to delete printers?
Is there an easier way to do this?

Cheers,
Mark
 
M

Mark Feodoroff

Hi All,

I accidentally sorted this out for myself.
I had another function in the script which restarted the spooler service
before the drivers were deleted. The prndrvr was being called before the
spooler had fully restarted.

Cheers,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top