For the longest while I have been attemtping to assemble a script to add my
network printers to Windows XP desktops. based on trial and error...I was
able to put together the following vbs script:
Set objWMIService = GetObject("winmgmts:")
sCmd = "rundll32.exe printui.dll,PrintUIEntry /if /b
""helpdesk_hpdj4000ps"" /f" _
& " L:\Drivers\Printers\XP\HPDJ4000ps\hpi4000d.inf /r" _
& " ""\\helpdesk\helpdesk_hpdj4000ps"" /m ""HP Designjet 4000ps PS3"
cmd = "control printers"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCmd, 1, True
oShell.Run cmd
sCmd = "rundll32.exe printui.dll,PrintUIEntry /if /b
""helpdesk_hp4500"" /f" _
& " L:\Drivers\Printers\XP\HPCLJ4500\hpbf232i.inf /r" _
& " ""\\helpdesk\helpdesk_hp4500"" /m ""HP Color LaserJet 4500 PCL 6"
cmd = "control printers"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCmd, 1, True
oShell.Run cmd
sCmd = "rundll32.exe printui.dll,PrintUIEntry /if /b
""helpdesk_hp4200"" /f" _
& " L:\Drivers\Printers\XP\HPLJ4200\PS\hp4200ps.inf /r" _
& " ""\\helpdesk\helpdesk_hp4200"" /m ""HP LaserJet 4200 PS"
cmd = "control printers"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCmd, 1, True
oShell.Run cmd
WScript.Echo "All network printers have been added to desktop!"
The installation itself works perfectly. However, after a few hours the
connection status changed from "Ready" to "Offine". Interesting enough,
users can print without problems although the status says "Offline".
Does anyone have any thoughts on fixing this Offline problem? Thanks a ton.
Peter.