borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Print ListView)Next Topic (How to make raw data send/receive) New Topic New Poll Post Reply
AndreaVB Forum : VB General : WMI - General question
Poster Message
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617

icon WMI - General question

Just had a fairly simple question...

There are a few things that I'm needing to get access to on a computer system (too great of a list to post here, but basically anything running, memory status, hardware information... basically everything that the examples now point to the WMI).

Are there any known problems using the WMI (other than not all items being supported on all OS's)?

Is there anything that must be installed on a computer for it to work properly (assuming not Win95 or NT), or will just having the reference in the project be enough (my computer has it as: "Microsoft WMI Scripting V1.2 Library").

Can a user disable the WMI if it is installed on their computer (easilly, or through a program to prevent hacking/spyware)?
[WMI's listed under "VBScript" places, making it seem more of a "web" thing that can be disabled on a computer.]



Normally... basically 98% of the time, I just write the code behind it to get the information (like for system processes, system memory...). But some things (hard drive serial number, systemboard info, etc) the WMI's always listed. At least when I write the code behind it, I know exactly what needs to be included, and what OS's it will or won't work on (for the most part) - and be able to code around it.





____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

21-07-2005 at 08:49 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: WMI - General question

As far as I remember about WMI......

quote:
Are there any known problems using the WMI (other than not all items being supported on all OS's)?


I thinkg I have read somewhere that installing SP2 on WinXP can petentially cause some WMI queris not to return any information, maybe it is best to read SP2 documentation and see what reflects WMI.

quote:
Is there anything that must be installed on a computer for it to work properly (assuming not Win95 or NT), or will just having the reference in the project be enough (my computer has it as: "Microsoft WMI Scripting V1.2 Library").


Win2k/XP have already installed WMI, and WMI is running as a service on these systems.

For Win95/Win98/NT WMI needs to be installed. It can be downloaded from MS site. WMI runs as a application on Win9x.

I also remember that There was a difference between collecting information from local and remote computer (win9x). If I remember, if quering for information through WMI on local computer, WMI will be started automatically, but when querying for info on remote computer, it wont, so querying will fail. I think in this case the workaround is involving registry changing, but cant remember what needs to be done. Also, if working on remote comp, I believe also DCOM needs to be installed.

quote:
Can a user disable the WMI if it is installed on their computer (easilly, or through a program to prevent hacking/spyware)?
[WMI's listed under "VBScript" places, making it seem more of a "web" thing that can be disabled on a computer.]


Since it runs as a service on a NT systems, stopping the service will disable WMI. Of course, adequate privilegies would be needed for this task.

I cant remember how WinMe likes WMI, but I guess shouldnt be much different that Win9x.

At last, take this info with caution, since it was long time ago since I was playing with it, so could be I have not stated all necessary info.  

____________________________
If you find the answer helpful, please mark this topic as solved.
21-07-2005 at 10:17 PM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: WMI - General question

Just checked on supported systems on MS site....

quote:
Currently, WMI is included when you install Microsoft® Windows® 2000, Windows XP, or Windows Millennium Edition (Me). For those running Windows 95 OSR 2, Windows 98 or Microsoft® Windows NT® 4.0, a WMI installation package can be downloaded from Microsoft® MSDN® which offers similar functionality as WMI in Windows 2000, Windows XP, and Windows Me.


... so I was wrong about WinMe, it has it included.  

____________________________
If you find the answer helpful, please mark this topic as solved.
21-07-2005 at 10:21 PM
View Profile Send Email to User Show All Posts | Quote Reply
JLRodgers
Level: Moderator

Registered: 04-04-2002
Posts: 1617
icon Re: WMI - General question

Thanks

I saw a few things on microsoft's site... but what should be, and what is sometimes varies, so I thought I'd ask just in case.



____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)

22-07-2005 at 05:16 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : VB General : WMI - General question
Previous Topic (Print ListView)Next Topic (How to make raw data send/receive) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder