Estimados amigos:
Cómo puedo desplegar las impresoras de la red con Visual Basic 6.0.
Mil gracias por adelantado.
| ||||
Re: Lista De Impresoras De La Red De el AD Scripting está en vbs, creo que te será facil migrarlo a vb6 Cita: rem Monitoring the Status of All the Printers on a Computer strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colInstalledPrinters = objWMIService.ExecQuery _ ("SELECT * FROM Win32_Printer") For Each objPrinter in colInstalledPrinters Wscript.Echo "Name: " & objPrinter.Name Wscript.Echo "Location: " & objPrinter.Location Select Case objPrinter.PrinterStatus Case 1 strPrinterStatus = "Other" Case 2 strPrinterStatus = "Unknown" Case 3 strPrinterStatus = "Idle" Case 4 strPrinterStatus = "Printing" Case 5 strPrinterStatus = "Warmup" End Select Wscript.Echo "Printer Status: " & strPrinterStatus Wscript.Echo "Server Name: " & objPrinter.ServerName Wscript.Echo "Share Name: " & objPrinter.ShareName Wscript.Echo Next |