Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

THREAD and WMI?

May
12,795
158
Will WMIQUERY and/or @WMI work inside THREAD? I can't get either to work. And I've seen these (below, without the usual indication of the source of the error). That makes me wonder if WMI must be somehow initialized in a thread.

Code:
v:\> thread wmiquery . "Select Name from Win32_Process where ProcessId=%_pid"

Error : Failed to create instance of WbemStatusCodeText
 
WMIQUERY requires (a lot of) COM, which isn't initialized in THREAD.

It could be done, though it'll add more than 10x to the memory usage and processing time, which kind of makes THREAD pointless. And it's probably not useful to use a command like WMIQUERY with THREAD, given that the output will get mixed up with whatever else TCC is doing.
 

Similar threads

Back
Top