Hello NG, I will del all printers on a computer, after this I will make 2 new network printer on it. Can I make that over a VBS ? Mike
Il giorno Tue, 26 Aug 2008 07:01:38 +0300, Mike Berger ha scritto: >Hello NG, > >I will del all printers on a computer, after this I will make 2 new >network printer on it. > >Can I make that over a VBS ? This lists all the printers Set WshNetwork = WScript.CreateObject("WScript.Network") Set oPrinters = WshNetwork.EnumPrinterConnections WScript.Echo "Network printer mappings:" For i = 0 to oPrinters.Count - 1 Step 2 WScript.Echo "Port " & oPrinters.Item(i) & " = " & oPrinters.Item(i+1) Next This removes a printer Set WshNetwork = WScript.CreateObject("WScript.Network") WshNetwork.RemovePrinterConnection "LPT1:" -- Giovanni Cenati (Bergamo, Italy) Write to "Reventlov" at katamail com http://digilander.libero.it/Cenati (Esempi e programmi in VbScript) --