Jump to content

Recommended Posts

Posted

'Remove ALL old printers

'Enumerate all printers first, after that you can select the printers you want by performing some string checks

Set WSHPrinters = WNet.EnumPrinterConnections

For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2

'To remove only networked printers use this If Statement

If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then

WNet.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True

End If

'To remove all printers incuding LOCAL printers use this statement and comment out the If Statement above

'WNet.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER +1),True,True

Next

'end delete existing printers

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...