Posts Tagged ‘vbscript’

VBScript to remove network printers, when RemovePrinterConnection fails and still have time for popcorn and a movie

For the last couple of months, and some months ahead, I am working primarely on migration projects, currently I have just finished developing a lot of scripts to automatically migrate from Novell & ZenWorks to a purely Microsoft environment. So I might share some tips and tricks from my experiences.

Novell LogoTrying to uninstall Novell printers automatically with VBScripting in a login script gave me a headache, for some reason the good old function WshNetwork.RemovePrinterConnection would fail every time trying to uninstall a Novell printer. After some searching and testing I found that by executing a command to RUNDLL32 PRINTUI.DLL,PrintUIEntry, I could successfully uninstall the printers. My personal experience shows no warnings or errors to the user, as long as the computer can still access Novell, however I did have some warning messages appear when the computer could not connect, but the printer was still deleted, and the user could not abort it, so in my book thats a success!

Also i found some examples removing the printers with /dn instead of the /dl that I am using Read the rest of this entry »