Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

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"

Posted

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

  • Thanks 1
Posted

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?

Posted

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.

Posted

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.

Posted

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.

Posted
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!
Posted

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.

  • 4 weeks later...

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