Gibbo Posted September 21, 2010 Posted September 21, 2010 I've started using a simple script to map my printers: Set WshNetwork = CreateObject("WScript.Network") On Error Resume Next Set oPrinters = WshNetwork.EnumPrinterConnections For i = 1 to oPrinters.Count - 1 Step 2 WshNetwork.RemovePrinterConnection oPrinters.Item(i) Next Set WshNetwork = CreateObject("WScript.Network") WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTIT1" WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTIT2" WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTIT3" WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTIT4" WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTLRC" WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTART" WshNetwork.AddWindowsPrinterConnection "\\HP-SERVER\PRINTMUSIC" rem ** Setup default printer ** WshNetwork.SetDefaultPrinter "\\HP-SERVER\PRINTLRC" But when the pupils logon they're also getting CF-SERVER\PRINTLRC CF-SERVER\PRINTIT1 CF-SERVER\PRINTIT2 CF-SERVER was the print server but was wiped back in 2008 and doesn't have any printers on it at all. Any idea where it could be pulling this information from? The registry shows nothing for CF-SERVER. TIA
K.C.Leblanc Posted September 21, 2010 Posted September 21, 2010 WshNetwork.RemovePrinterConnection "\\server\printer", true, true can be used to zap it. It could be being stored in a profile. 1
Gibbo Posted September 21, 2010 Author Posted September 21, 2010 Just about to add that I've narrowed it down to the pupil's mandatory profile! For some reason it's adding the rogue server to the registry at HKLM\Software\Microsoft\Windows NT\CurrentVersion\Print\Providers\LanMan Print Services\Servers
K.C.Leblanc Posted September 21, 2010 Posted September 21, 2010 I've had that problem before, I can't remember how I fixed it. It'll probably be one of these./ You can either make a copy of the profile, make it writeable (change ntuser.man to ntuser.man),assign it to an unrestricted account with no GPOS of scripts. Then log in the account remove the printers, log off the profile changes will be saved. Then test the profile and use it to replace the original student profile Of you can use regedit's load hive function to edit the ntuser.man file. Load a hive into the registry: Core Services. Don't edit a live student profile, make a copy edit the copy then test and copy back over.
Gibbo Posted September 21, 2010 Author Posted September 21, 2010 All sorted. Gave an Admin account the mandatory profile. Logged in and removed the rogue printers. Found this old thread about it: http://www.edugeek.net/forums/windows/1517-modifying-mandatory-profile-printers.html
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now