high cpu usage using wmi

A

anonymous

I have written an application that starts a ManagementEventWatcher and uses
WMI. The application takes around 0-1% CPU in XP whereas in Vista CPU usage
is 40% continuously. Is there a fix?
 
G

Guest

You are posting from the future, please adjust your time&date settings.
I never read posts from people who try to get on top of the list this way.
 
A

anonymous

I didnt know that posts written here take around 5 minutes to appear.
anyways can you answer my question?
 
M

Mr. Arnold

anonymous said:
I have written an application that starts a ManagementEventWatcher and uses
WMI. The application takes around 0-1% CPU in XP whereas in Vista CPU usage
is 40% continuously. Is there a fix?

Well, your .Net program runs on a thread. So, set the thread's processing
priority.

System.Threading.Thread.CurrentThread.Priority = High, Normal,
BelowNormal -- enums.

You can look it up use the .NET IDE Help or use Google.

You should post to a MS-Public-dotnet NG.
 
A

anonymous

Hi Mr Arnold, the program runs fine on Windows XP. I saw that the CPU is
used by wmiprvse.exe which is not the same process as the program. So
System.Threading.Thread.CurrentThread.Priority on the program will not
affect wmiprvse's priority. I have manually set wmiprvse.exe's priority to
low but no luck, the same 40-50% use.

This problem doesn't occur in XP, and the program and wmiprvse.exe both take
less than 1% CPU on the average. So, it is a Vista issue.

Your further suggestions are appreciated.
Thanks.
 
M

Mr. Arnold

anonymous said:
Hi Mr Arnold, the program runs fine on Windows XP. I saw that the CPU is
used by wmiprvse.exe which is not the same process as the program. So
System.Threading.Thread.CurrentThread.Priority on the program will not
affect wmiprvse's priority. I have manually set wmiprvse.exe's priority to
low but no luck, the same 40-50% use.

This problem doesn't occur in XP, and the program and wmiprvse.exe both
take less than 1% CPU on the average. So, it is a Vista issue.

Your further suggestions are appreciated.

You may be able to look at the code for this solution and pillage and
plunder something together that you could use, non UI. It's a shot.

http://www.codeproject.com/csharp/CustomTaskManager.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top