WMI question 
Author Message
 WMI question

hi all

i'm trying to run a WMI query using the 'LIKE' operator
but an error stating that the query is invalid is
returned. i know the jscript coding is correct since the
same query changed to use the '=' operator works.

is this a known problem, and is there a workaround? from
the doco i found this is supposed to be a standard feature
(as opposed to enhanced WMI querying through SMS)

cheers
lain

ps: while this is being run under the WSH, is there a more
appropriate newsgroup for WMI questions?



Sun, 02 May 2004 11:13:10 GMT  
 WMI question
The microsoft.public.wbem newsgroup deals specifically with WMI.

Posting a simple example of actual code that you *think* should work would also be helpful.

--
Michael Harris
Microsoft.MVP.Scripting

Quote:

> hi all

> i'm trying to run a WMI query using the 'LIKE' operator
> but an error stating that the query is invalid is
> returned. i know the jscript coding is correct since the
> same query changed to use the '=' operator works.

> is this a known problem, and is there a workaround? from
> the doco i found this is supposed to be a standard feature
> (as opposed to enhanced WMI querying through SMS)

> cheers
> lain

> ps: while this is being run under the WSH, is there a more
> appropriate newsgroup for WMI questions?



Sun, 02 May 2004 11:47:49 GMT  
 WMI question
Thanks Michael

I only have access through the MS-hosted web-based
newsgroups and I can't find this one. Thanks anyway.

For you reference, here's the query I assigned to a string
and later executed (JScript):

wmiQuery = "SELECT * FROM Win32_Directory WHERE Name
LIKE 'c:\\\\winnt%'";

As I said, if I replace the LIKE with = and delete the %
it works (even if that's pointless) which is why I'm not
sure what's going on. I've also tried the SQL part from
WBEMTEST with the same results. We're running Win2000 SP1.

Cheers
Lain



Sun, 02 May 2004 12:37:23 GMT  
 WMI question

Quote:

> I only have access through the MS-hosted web-based
> newsgroups and I can't find this one. Thanks anyway.

Web-based newsgroup address for microsoft.public.wbem:
http://communities.microsoft.com/Newsgroups/default.asp?ICP=MSCOM&sLC...

--
torgeir



Sun, 02 May 2004 12:48:53 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. WMI Question

2. WMI Question

3. WMI Question

4. WMI Question

5. WMI Question

6. WMI Question

7. WMI questions

8. WMI question

9. Scripting-Newbie question - WMI

10. Scripting newbie question on WMI

11. WMI impersonation question

12. Novice Question: Using VBScript + WMI within ASP

 

 
Powered by phpBB® Forum Software