Deploying printers to XP in Windows 2008 AD environment

Posted on 10th March 2011 by
Sam


To control printers through Windows 2008 & Group Policy in an XP client environment.

1. Download and install Group Policy Preference Client Side Extensions for Windows XP (KB943729) or/and Vista.

This package can be distributed through WSUS, or use a Windows Startup .vbs script, example below. Modify “\\server\share” – to location of Windows-en-US-KB943729.exe. Note a log directory will be created in the share and a file for each successfully rolled out PC is created.

On Error Resume Next

strShare = “\\server\share”
strInstaller = strShare & “\Windows-en-US-KB943729.exe”
strLogFolder = strShare & “\logs”

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objShell = WScript.CreateObject(“WScript.Shell”)
strComputerName = objShell.ExpandEnvironmentStrings(“%computername%”)

If Not objFSO.FolderExists(strSystemRoot & “\” & “$NtUninstallKB943729$”) Then
Set objWMIService = GetObject(“winmgmts:\\.\root\cimv2”)
Set colItems = objWMIService.ExecQuery(“Select Caption From Win32_OperatingSystem”)

For Each objItem in colItems
If InStr(objItem.Caption, “Vista”) Then
blnVista = True
End If
Next

If Not blnVista Then
objShell.Run strInstaller & ” /quiet /passive /norestart”, 0, True

If Not objFSO.FolderExists(strLogFolder) Then
objFSO.CreateFolder strLogFolder
End If

Set objReport = objFSO.CreateTextFile(strLogFolder & “\” & strComputerName, True)
objReport.Close
End If
End If

2. You may now use either User or Computer Policy to assign printers to clients, under Preferences>Control Panel Settings>Printers

If you require assistance with such or similar issues, please contact our IT Support department, who will happy to advise on an Ad-Hoc IT Support basis