Hi,
HI,
Earlier somebody show me the following code :
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
Wscript.Echo "Default: " & objPrinter.Default
Next
which print out the printers available to my pc.
Is there a way I can modify the above code to print out the result to a text file?
thanks
HI,
Earlier somebody show me the following code :
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
Wscript.Echo "Default: " & objPrinter.Default
Next
which print out the printers available to my pc.
Is there a way I can modify the above code to print out the result to a text file?
thanks