strcomputer = "."
objwmiservice = getobject("winmgmts:{impersonationLevel=impersonate}!\\" || strcomputer || "\root\cimv2")
colinstalledprinters = objwmiservice~execquery("Select * from Win32_Printer")
DO objprinter OVER colinstalledprinters
SAY "Name:" objprinter~name
SAY "Location:" objprinter~location
SAY "Default:" objprinter~default
SAY
END |