swpmre Posted May 20, 2015 Posted May 20, 2015 Hi, We've got a strange, but relatively minor error, which is causing frustration. Network is Windows 7 machines everywhere, Windows Server 2008, and Xerox Phaser 8560 networked printers. The printers are networked through a file print server based at our main site, which is geographically distant (approx 10 miles) from the site where the user is. Very occasionally the networked printer does not appear in the printer list in Office, or in the Devices and Printers dialog. If the user reboots, or another user logs on, invariably the printer will reappear. This is a fairly simple work-around, but it is a waste of time, and we'd like to stop it happening. I cannot see anything different about the configuration of this printer. The problem is not restricted to this PC, nor to this user. Though I do not know of it happening at a different site. One thing I speculated on is that the distance between the sites and an inadequate network connection might mean that the printers didn't load properly, though I would have thought that if this was the case we would experience the problem more frequently than we currently do. Does anyone have any other ideas? Thanks in advance for any suggestions.
Gaz Posted May 21, 2015 Posted May 21, 2015 How is the printer mapped? GPP? or Print Management? Does anything appear in the event logs regarding the printer failing to map?
swpmre Posted May 27, 2015 Author Posted May 27, 2015 Mapped and deployed through Printer Management. I cannot see anything in the logs that show there is a problem.
timbo343 Posted May 27, 2015 Posted May 27, 2015 (edited) You could mock up a very simple printer vbs script (a little bit of googling will help you here) to see if this will map the printer. We have been using vbs for deploying printers since moving to windows 7 and its not missed a beat (unless ive stuck the odd random character in by mistake). It is just in the logon and logoff part of policy in group policy. This runs at logoff: Set wshNetwork = CreateObject("WScript.Network") on Error Resume Next 'Deletes all network printers Set clPrinters = WshNetwork.EnumPrinterConnections On Error Resume Next For i = 0 to clPrinters.Count - 1 Step 2 wshNetwork.RemovePrinterConnection clPrinters.Item(i+1), true Next and this runs at logon (heavily edited but shows the basics: ' Script to add network printers to workstations and thin clients WHEN THEY ARE PART OF A SPECIFIC GROUP IN AD ' Declare variables and enumerate existing printer connections ' Setting the parameters up On error resume next Set WshShell = WScript.CreateObject("WScript.Shell") Set WshNetwork = WScript.CreateObject("WScript.Network") Set wshnetwork = CreateObject("WScript.Network") Set ADSysInfo = CreateObject("ADSystemInfo") Set CurrentUser = GetObject("LDAP://" & ADSysInfo.Username) Set oPrinters = WshNetwork.EnumPrinterConnections dim Counter, PrinterPath dim strConnectString, strResult strGroups = LCase(CurrentUser.MemberOf) strGroups = LCase(Join(CurrentUser.MemberOf)) strUser = WshNetwork.username ' Sets the groups up with the member of settings in AD ' Const = Identifier in script | cn = group name in AD Const Maths = "cn=mathematics" Dim computerName computerName = LCase(WshNetwork.ComputerName) 'WScript.Echo "computername variable: " & (computerName) 'Deletes All Network Printers... Not manually installed ' For i = 0 to oPrinters.Count - 1 step 2 ' Wshnetwork.RemovePrinterConnection oPrinters.Item(i+1), true ' ' NEXT 'WScript.Echo "computername variable: " & (computerName) ' ++++++++++++++++++++++++++++++++ Remove Printer at logon ++++++++++++++++++++++++++++++++++ 'Staff group 'If Instr(strGroups,Staff) then 'For i = 0 to oPrinters.Count - 1 step 2 'Wshnetwork.RemovePrinterConnection oPrinters.Item(i+1), true 'NEXT 'End If 'staff ' ############################################# FOLLOW ME / Print Queues #################################################### ' Follow Me Queue - Staff group If Instr(strGroups,staff) then wshnetwork.addwindowsPrinterConnection "\\server\printer" End If 'Follow Me Queue ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' ++++++++++++++++++++++++++++++++ IT Room 2 Printer (Kyocera P6030cdn) ++++++++++++++++++++++++++++++++++++++++++++++++ ' Adding printer depending on part of computer name ' IT Room 2 Computers Select case (Left(computername,4)) Case "it2-" wshnetwork.addwindowsprinterconnection "\\server\printersharename" wshnetwork.setdefaultprinter "\\server\printersharename" End Select 'IT room 2 Computers ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' Users to map this printer only! Select case strUser Case "Input_A_Username_here" wshnetwork.addwindowsprinterconnection "\\server\printersharename" End Select 'Users - Map printer only ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ' Computers to map ans set this printer as default Select Case (computerName) Case "Computer_Name","Another_Computer_Name_optional" wshnetwork.addwindowsprinterconnection "\\server\printersharename" wshnetwork.setdefaultprinter "\\server\printersharename" WScript.Echo "Printer ************ added successfully End Select 'Computers to map and set this printer as default Edited May 27, 2015 by timbo343
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