hi,
I have 30 printers in my company,
If I try to connect winxp share printer it’s work fine, bat if I try to connect a win98 share printer I get “premission denied”
this is the script:
strcomputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
Set colInstalledPrinters = objWMIService.ExecQuery _
(“Select * from Win32_Printer”)
For Each objPrinter in colInstalledPrinters
If “\\” = Left( objPrinter.ServerName, 2 ) Then
objPrinter.Delete_
Else
end if
next
Set WSHNetwork = CreateObject(“WScript.Network”)
‘List of printers to connect
WSHNetwork.AddWindowsPrinterConnection “\\10.20.0.118\hp”
WshNetwork.SetDefaultPrinter “\\10.20.0.118\hp”