Try to use this : WSHNetwork.SetDefaultPrinter "\\ServerName\PrinterName. You have to properly configure the printer path so that users on your network are able to access the same. I am also giving you a script that would help you to configure the printer is above thing does not work.
Code:
Set WSHShell = CreateObject("WScript.Shell")
Set WSHNetwork = CreateObject("WScript.Network")
'Edit the next line with your domain name
DomainString = "DomainName"
UserString = WSHNetwork.UserName
'Bind to the user object to get user name and check for group memberships
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
'Synchronizes the time with Server our NTP Server
WSHShell.Run "NET TIME \\Server /set /y"
'Disconnect any drive mappings as needed.
WSHNetwork.RemoveNetworkDrive "F:"
'Give the PC time to do the disconnect, wait 300 milliseconds
wscript.sleep 300
'Map drives needed by all
WSHNetwork.MapNetworkDrive "U:", "\\server\users",True
WSHNetwork.MapNetworkDrive "X:", "\\server\executables",True
'Now check for group memberships and map appropriate drives
For Each GroupObj In UserObj.Groups
Select Case GroupObj.Name
'Check for group memberships and take needed action
'In this example below, ADMIN and WORKERB are groups.
Case "Admin"
WSHNetwork.MapNetworkDrive "w:", "\\Server\Admin Stuff",True
Case "WorkerB"
WSHNetwork.MapNetworkDrive "w:", "\\Server\Shared Documents",True
End Select
Next
'Install Printers
WSHNetwork.AddWindowsPrinterConnection "\\Server\HP5si"
'Remove an old printer
WSHNetwork.RemoveWindowsPrinterConnection "\\ServerOld\HP5si"
' This section of script will prevent the baloon window that appears when
printing
' to a network shared printer after XP Service Pack 2 is installed.
'=====================================
Path = "HKCU\Printers\Settings\EnableBalloonNotificationsRemote"
WshShell.RegWrite Path, 0 ,"REG_DWORD"
'Clean Up Memory We Used
set UserObj = Nothing
set GroupObj = Nothing
set WSHNetwork = Nothing
set DomainString = Nothing
set WSHSHell = Nothing
'Quit the Script
wscript.quit
===================
Bookmarks