Nevermind I got it to work. Thank you ettienne.
Set WshNetwork = WScript.CreateObject("WScript.Network")
On Error Resume Next
WshNetwork.RemovePrinterConnection "\\sny-apps\canon1"
On Error Resume Next
WshNetwork.RemovePrinterConnection "\\sny-apps\canon2"
On Error Resume Next...
Thanks ettienne. Where do I insert that code? Below is still not working. Thanks again.
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.RemovePrinterConnection "\\sny-apps\canon1"
On Error Resume Next
WshNetwork.RemovePrinterConnection "\\sny-apps\canon2"
On Error Resume...
I am trying to delete a selected network printers for our users but in the real world, some user may only have 1 or of the 3 printers I needed to delete installed. For example if the user only has canon2 and canon3 installed, the script errors out because it does not detect canon1 and the script...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.