WMI in VB.NET

  • Thread starter Thread starter Nak
  • Start date Start date
N

Nak

Hi there,

I was wondering if someone with WMI knowledge could ask me this one,

*Where does WMI get its information from? Especially the **version of
the operating system**, is it held in the registry? or in a database? or
does it get it by examining a DLL?

Thanks in advance.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
* "Nak said:
I was wondering if someone with WMI knowledge could ask me this one,

*Where does WMI get its information from? Especially the **version of
the operating system**, is it held in the registry? or in a database? or
does it get it by examining a DLL?

AFAIK WMI uses in some cases platform calls to get the information.
 
Hi Herfried,
AFAIK WMI uses in some cases platform calls to get the information.

What is a platform call? Surely the information must still be stored
somewhere on the system? I'm only after location where the version of
Windows is located, i.e. 5.1 build 2600 bla bla bla, thanks again :-) I
shall go lookup "platform call" as well now.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
* "Nak said:
What is a platform call?

Windows API call.
Surely the information must still be stored
somewhere on the system? I'm only after location where the version of
Windows is located, i.e. 5.1 build 2600 bla bla bla, thanks again :-) I
shall go lookup "platform call" as well now.

Why not use 'Environment.OSVersion'?
 
Hi Herfried,
Why not use 'Environment.OSVersion'?

I want to know where the value is stored, I do not want to obtain it through
the normal route. Thanks again.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
* "Nak said:
I want to know where the value is stored, I do not want to obtain it through
the normal route. Thanks again.

I don't think it's stored in the registry. Why do you need that?!
 
Hi Herfried,
I don't think it's stored in the registry. Why do you need that?!

I'm interested in knowing where it is stored as I wish to be able to change
it, I want to see what effect it has on the "Users and groups" computer
management snapin. Today I managed to remotely "adiminister" an XP Pro
system via my computer management panel, but I can't administer my own XP
Home system!!. Unfortunately something else that I tried today actually on
the XP Pro system resulted in my adiminstration rights from the sole account
on my XP Home system from being removed. I believe that the there is no
reason why the "users and groups" snapin should be disabled for Home users,
I believe that it works by obtaining the OS version via WMI.

I took a look at a VB.NET WMI version and it contains a database query
string to obtain the values

"objOS = New ManagementObjectSearcher("SELECT * FROM
Win32_OperatingSystem")"

This suggest to me that the data *may* be stored in a database tucked away
somewhere. This is also out of curiosity as to how WMI works, I don't
believe it *just knows* your OS version, I believe this version is hard
coded on install, probably along with your PA (Product Activation) details,
which has also failed on me before and caused me to be locked out of my
machine (not that different from todays little episode).

Maybe there is some hidden database driver in Windows that obtains these
values from a proprietry database format, along with the thumbnails stored
in those thumbs.db files and that is why no items can be removed, maybe
because they never implemented a DELETE query! I would like to have a more
indepth understanding of the internals of Windows, hence my "keen'ness" to
learn just about everything at once!

I'll probably mess my system up by changing it, but at the end of the day,
it's a good way of learning and I can always install again!

So you have no idea where it is stored then?

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Hi Nick,

There is no such a hiden database in Windows. Most such information are
stored in system registry. When we execute query in WMI, they will be
convert to platform API. For example, to get **version of the operating
system**, an API function GetVersion() will called. And this information
are stored in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

(The registry path may changes with windows version, this is on Windows
server 2003)

Hope this answer your question,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi Luke,
There is no such a hiden database in Windows...

Easy tiger! ;-)
... stored in system registry. When we execute query in WMI, they will be
convert to platform API. For example, to get **version of the operating
system**, an API function GetVersion() will called. And this information
are stored in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

Excellent, just what I was after, I somehow missed this while searching the
registry. I think that should do the trick, thanks a bunch Luke :-)

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Hi there,

|| There is no such a hiden database in Windows...

Would we tell you? Like, no ways Dude!!

;-)

Flying Frank,
Big Top, CA
 
Hi Frank,
Would we tell you? Like, no ways Dude!!

ROFL!

It is just so plain obvious, like the other day I was trying to open the
"advanced file sharing" dialog's that "apparently" doesn't work in XP Home.
Strange how it works under the internal administration account huh? I
wouldn't mind so much if the application was completely different, but I
swear that XP Home has a little option in the registry, like...

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\MakeAlmostIdenticalToXPPro
= 0

Hmmm! I have made a little "aplette" today that exposes 39 policies
that aren't available any other way. Hopefully I'll find a huge collection
and release a patch on my web site, "Upgrade XP Home to XP Pro with a simple
236kb download for FREE!!", I can but dream huh?

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Hi "VirusMan"
That's how my apps work, too. I can do all sorts of things on my user's
machines that they have no idea how to do. I just reach in with my remote
'administration' utility and away I go!!

VirusMan
www.as-is.com/no-warrenties/and-all-that

LOL, Fergus by any chance? ;-) I believe that is how Microsofts Apps work
too

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"Would you like to send an error report from you pirated software?"

Microsoft - Windows XP sees a new form of "debugging"
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Back
Top