bodminman Posted October 31, 2011 Posted October 31, 2011 Hi there, just setup a new domain and most things appear to be ironed out on the test machines apart from printers. I have tried allocatiing printers to an OU containing XP machines via startup and login vbs script but the printer just will now appear! I created a separate GPO and linked it to the OU specifically for this purpose. Any ideas/pointers will be greatly appreciated.
Mcshammer_dj Posted October 31, 2011 Posted October 31, 2011 can you connect to the share manually? check that the name of the share is the same in the vbs. Maybe post the vbs here and see if anyone can see a problem. what server os and what XP bit level
bodminman Posted October 31, 2011 Author Posted October 31, 2011 Can connect to the printer manually. Here is the vbs: Set WshNetwork = CreateObject("WScript.Network") PrinterPath = "\\StMarys-01\ICT - Ricoh" PrinterDriver = "GelSprinter GX e3350N PCL 6" WshNetwork.AddWindowsPrinterConnection PrinterPath, PrinterDriver WshNetwork.SetDefaultPrinter "\\StMarys-01\ICT - Ricoh"
Mcshammer_dj Posted October 31, 2011 Posted October 31, 2011 Option Explicit Dim objNetwork, strUNCPrinter strUNCPrinter = "\\server_name\printer_share" Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection strUNCPrinter strComputer = "." Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer where DeviceID = 'Microsoft Office Document Image Writer'") For Each objPrinter in colInstalledPrinters objPrinter.Delete_ Next Set colInstalledPrinters = objWMIService.ExecQuery ("Select * from Win32_Printer where DeviceID = 'Microsoft XPS Document Writer'") For Each objPrinter in colInstalledPrinters objPrinter.Delete_ next WScript.Quit ' End of Windows printer script. This works for me and it removes the MS Office and XPS image printers 1
bodminman Posted October 31, 2011 Author Posted October 31, 2011 Just trying your script now so will update you in 5 minutes or so. Thanks
bodminman Posted October 31, 2011 Author Posted October 31, 2011 Just got an error saying that the script failed on line 8 charactor 1. I take it that's the StrComputer line or don't line spaces count?
Mcshammer_dj Posted October 31, 2011 Posted October 31, 2011 take the strcomputer line and all below out. and then run to check that it creates and maps the printer
bodminman Posted November 1, 2011 Author Posted November 1, 2011 Tried this script running from both Computer/Startup and User/Login but the printer fails to appear. However when I copy the same script locally to the workstation and run it, the printer installs fine! Any ideas anyone?
Michael Posted November 1, 2011 Posted November 1, 2011 Is there any reason you're not deploying printers with GPOs? You can do computer, user or a combination of both.
bodminman Posted November 1, 2011 Author Posted November 1, 2011 Tried doing via GPO deployment but that didn't work either.
Michael Posted November 1, 2011 Posted November 1, 2011 With Windows Server 2008 R2 deploying to Windows 7 it literally is a case of installing the printer, sharing it and then deploying it using Print Management. Providing the drivers are actually any good, but that's another story... With Windows Server 2003 R2 or 2008 R2 deploying to Windows XP, again as above you share and deploy using Print Management, but you also need to deploy a file 'pushprinterconnections.exe' as a Startup file.
bodminman Posted November 1, 2011 Author Posted November 1, 2011 I found the info re pushprinterconnections and downloaded the 32bit version to run on the XP machines. Other than that I done what you described but no printer appeared. It really is a weird one especially as I can install the printer manually via vbs or Add Printer wizard. I'll give the GPO route another go and update here in about 10 minutes.
Michael Posted November 1, 2011 Posted November 1, 2011 If you're deploying using 2008 R2, you need to install the 64Bit drivers first, then 32Bit (same type of driver and version). Windows will then intelligently pick the right printer driver for 32Bit or 64Bit workstations. Adding the 64Bit can be done manually or running a setup file (it depends really). Adding the 32Bit driver in Print Management is something you do manually.
bodminman Posted November 1, 2011 Author Posted November 1, 2011 Hi there, I originally added the printer to the server using the 64bit driver and then later added the 32bit version. Just retried via the GPO and still no joy. This is really starting to pee me off TBH!
Michael Posted November 1, 2011 Posted November 1, 2011 Are you adding printers to an existing GPO or a new GPO? Whichever method, is the GPO linked to the correct OUs?
bodminman Posted November 2, 2011 Author Posted November 2, 2011 A new GPO linked to the OU where the PC's are. The GPO was created just for this purpose and has nothing else in it.
ricki Posted November 2, 2011 Posted November 2, 2011 Tried doing via GPO deployment but that didn't work either. Hi Windows xp needs a pushprinter.exe to work have a look at this guide Deploy printers by using Group Policy Richard
Michael Posted November 2, 2011 Posted November 2, 2011 This guide for 2003 R2 (the same procedure as 2008 R2) to XP is pretty good. 1
bodminman Posted November 2, 2011 Author Posted November 2, 2011 Can someone please send me a 32bit version of PushPrinterConnections.exe PM me for email address if you can help. Thanks
ricki Posted November 2, 2011 Posted November 2, 2011 HI I think this is where it is A 32-bit printer driver and the PushPrinterConnections.exe utility are available for Windows Vista and for Windows Server 2008 Richard
bodminman Posted November 2, 2011 Author Posted November 2, 2011 HI I think this is where it is A 32-bit printer driver and the PushPrinterConnections.exe utility are available for Windows Vista and for Windows Server 2008 Richard Just tried to install this onto Server 2008 and it's telling me that this update does not apply to this system.
Michael Posted November 2, 2011 Posted November 2, 2011 Download Pushprinterconnections.exe here. This is taken from one of my Windows Server 2003 R2 servers which was running Print Management in the past. You don't need to install it, just copy it as a startup script as it is. Set the startup script pushprinterconnections.exe and your deployed printers in the same GPO.
speckytecky Posted November 28, 2011 Posted November 28, 2011 Did you crack the prblem Bodminman. If so I'd be interested to hear how
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