Hello Thank you very much for your quick response. But the problem is that the server is Windows 2000 server. and its not recognzing the Rename Printer Here is the script that i run strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colPrinters = objWMIService.ExecQuery _ ("Select * From Win32_Printer")
For Each objPrinter in colPrinters If Left(objPrinter.DeviceID,22) = "Client\pailles_dom-nns" Then Wscript.Echo objPrinter.DeviceID Wscript.Echo Mid(objPrinter.DeviceID, InStrRev(objPrinter.DeviceID, "\") + 1) varprint= Mid(objPrinter.DeviceID, InStrRev(objPrinter.DeviceID, "\") + 1) objPrinter.RenamePrinter("hp LaserJet 1320 PCL 5e") END IF Next
Its working fine on XP but on Windows 2000 Server i am having the error: C:\script\printerrename1.vbs(14, 5) Microsoft VBScript runtime error: Object doesn't support this property or method: 'objPrinter.RenamePrinter'.
i have got another script from the KiXtart site but don;t know how to implement on the machine or how to test it.If you would like to have a look at the script KiXtat, i can send you
PLease do help me.I really need it
Thanks a lot in advance
Nazeedah
|