sippo Posted December 4, 2012 Posted December 4, 2012 We seem to have an intermittent problem where users log in to a Windows 7 PC and sometimes the printer gets added, sometimes it doesn't. It really is random. We use a log on script to connect the printer which is on a 2008 r2 and uses the HP universal print driver. I think it's something to do with the print spooler. Is there a way of starting this via a log-on script?
Michael Posted December 4, 2012 Posted December 4, 2012 Is there a reason you don't deploy printers via GPO or GPP? It's a cleaner way of doing things with Windows 7.
sippo Posted December 4, 2012 Author Posted December 4, 2012 Yeah that's what we are trying to do with GP Loopback.
sonofsanta Posted December 4, 2012 Posted December 4, 2012 I had that with GPP for so long I gave up and went to scripting. Then had problems with the Universal (Oki) driver and went back to model-specific drivers and it's all been spiffing since. Can you just tell it to run C:\Windows\System32\spoolsv.exe on login? (somewhere under GPO there's an admin template for run at login) net start spooler would be the other obvious one but I suspect you'll hit permissions errors there
sippo Posted December 5, 2012 Author Posted December 5, 2012 What sort of scripting did you use? The issue is so random. When a user logs on a pc, then the printers won't be there. But if another user, with exactly the same policy, logs in the printers will be added. Sometimes some PC's add a printer, then sometimes it won't. It's a really frustrating one for everyone because it is so random!
penfold Posted December 5, 2012 Posted December 5, 2012 I had a similar issue with a bad driver when we upgraded the print server from 2003-2008. It took a while to check as it was caused by a bad print driver being left behind on the client when the printer was deleted but still caused the print spooler to crash and as a result no printers were listed. Only real solution I had was to remove the bad driver from the client and remap the correct printer. Printers were mapped based on group membership and the issue was being reported from different departments so I couldn't find a link. It turned out it was because the staff who had the problem were all in the same group and had installed the bad driver before I had updated it. I think it was the Kyocera universal driver we are now using instead of the model specific one which caused problems. If you have changed the driver recently it might be worth checking if the old driver is still installed on the client?
sonofsanta Posted December 5, 2012 Posted December 5, 2012 The issue is so random. When a user logs on a pc, then the printers won't be there. But if another user, with exactly the same policy, logs in the printers will be added. Sometimes some PC's add a printer, then sometimes it won't. It's a really frustrating one for everyone because it is so random! That was what it was like here. Worked fine 98% of the time, but 2% * 450 computers * (5 periods + lunch + break) = a lot of sessions with broken printer connections. It was improved with GPP by running a gpupdate /force as a Run on Login program, but when it came to policy refresh after 90 minutes printers might still disappear; disabling the refresh of printers stopped the login gpupdate working. Rock and a hard place! What sort of scripting did you use? As the GP objects were set up for GPP already, my printers are sent out by individual scripts - no fancy logic based on computer name (wouldn't work here anyway), just some 60-70 different GPOs to cover every printer and often cover it being default or just being additional. For a default printer, and this policy needs to be set to run before any other printer policies you script, I use Dim server Dim printer ps0 = "\\PRINTSERVER\" printer = "" 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 'Add Network printer wshNetwork.AddWindowsPrinterConnection server & printer 'Set Default Printer wshNetwork.SetDefaultPrinter server & printer Edit the variables in lines 4 & 5 to suit. For additional printers, I just stripped out the "remove all network printers" section and the default printer bit, so Dim server Dim printer ps0 = "\\PRINTSERVER\" printer = "" Set wshNetwork = CreateObject("WScript.Network") on Error Resume Next 'Add Network printer wshNetwork.AddWindowsPrinterConnection server & printer I know those scripts are hardly exemplar work, but they're adapted from what I found lurking in corners on here and hacked together for my own purposes. As I said, though, even with scripts we had issues with the universal Oki driver, they were just more blatant - instead of just not adding the printer, it would appear with a big red X, and wouldn't connect. Switching back to specific drivers for each model solved that and now it's sweet as a nut (at last - took two months). 1
plexer Posted December 5, 2012 Posted December 5, 2012 As I said, though, even with scripts we had issues with the universal Oki driver, they were just more blatant - instead of just not adding the printer, it would appear with a big red X, and wouldn't connect. Switching back to specific drivers for each model solved that and now it's sweet as a nut (at last - took two months). Now you've jixed it Ben
sonofsanta Posted December 5, 2012 Posted December 5, 2012 Now you've jixed it Ben I did the same thing in another thread yesterday, I can't help myself at the moment I'm either naïvely optimistic about all this or just a subconscious glutton for punishment.
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