Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

Just a quick one really... been looking at the printer scripts for sorting out printers at login but I've got a slew of AUTO printers that are proving trickier to remove.

 

I have a niggle that says this is solveable via GPO but in the interim if anyone has any tips for naming, etc.. to get rid of these things I'd appreciate it.

 

Thanks...

 

Oh and we're using WinXP SP2 workstations in a Win Server 2003 SP1 domain and using VBS in the login script..

 

 

Edit:

Forgot to mention that all the printers are on printservers (DLink, HPJet) and all setup on the server as local using TCP_IP ports but then shared from the server to the workstations.

Posted
Just disable "Automatically search for network folders and printers" in the folder options of your workstations.
  • 2 years later...
Posted

This script helped when deleting auto printers, after you have disabled auto discovery, warning it deletes ALL local printers. All VBS scripts.

 

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

 

Set colInstalledPrinters = objWMIService.ExecQuery _

("Select * from Win32_Printer Where Network = FALSE")

 

For Each objPrinter in colInstalledPrinters

objPrinter.Delete_

Next

Set colInstalledPrinters = objWMIService.ExecQuery _

("Select * from Win32_Printer Where Network = FALSE")

For Each objPrinter in colInstalledPrinters

objPrinter.Delete_

Next

 

Script to disable auto discovery.

 

Set WshShell = CreateObject( "WScript.Shell" )

 

WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NoFileFolderConnection", 00000000, "REG_DWORD"

WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\NoNetCrawling", 00000001, "REG_DWORD"

 

Thought this might help.

  • 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...