Question
March 27, 2008 at 12:40 PM
adam.chiarotto

Help with WMI Query Error 80041017

by adam.chiarotto . Updated 18 years, 4 months ago

Hello All,

I am trying to execute an HTA on a WinXP box that will just show the printer information of printers on the Win2K print server, however it won’t take anything as a WHERE or LIKE clause:

Set colPrinters = objWMIService.ExecQuery _
(“SELECT * FROM Win32_Printer WHERE Name LIKE ‘\\SERVER\%'”)
For Each objPrinter in colPrinters

I’ve tried using no ‘, changing LIKE to WHERE, even using a specific printer name and i keep getting this error 80041017 on the “For Each objPrinter in colPrinters” line.

Anyone have any idea why this may be happening?
Any help is appreciated.

Here is the entire .hta:





This discussion is locked

All Comments