Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: Goes with http://pastebin.com/T526hHx1
- strComputer = "."
- Set objWMIService = GetObject("winmgmts:" _
- & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
- Set colItems = objWMIService.ExecQuery _
- ("Select * from Win32_Printer")
- For Each objItem In colItems
- Wscript.Echo "Description: " & objItem.Description
- Wscript.Echo "Printer: " & objItem.DeviceID
- Wscript.Echo "Driver Name: " & objItem.DriverName
- Wscript.Echo "Port Name: " & objItem.PortName
- Wscript.Echo "ShareName: " & objItem.ShareName
- Wscript.Echo "Location: " & objItem.Location
- Wscript.Echo
- Wscript.Echo
- Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement