473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WMI in VB.NET

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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #1
12 2439
* "Nak" <a@a.com> scripsit:
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.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Nak
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #3
* "Nak" <a@a.com> scripsit:
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'?

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Nak
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #5
* "Nak" <a@a.com> scripsit:
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.


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

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Nak
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #7
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.)

Nov 20 '05 #8
Nak
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"MSFT" <lu******@online.microsoft.com> wrote in message
news:Yi**************@cpmsftngxa06.phx.gbl... Hi Nick,

(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.)

Nov 20 '05 #9
Hi there,

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

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

;-)

Flying Frank,
Big Top, CA
Nov 20 '05 #10
Nak
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\Make AlmostIdenticalToXPPro
= 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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #11
Hi Guys,

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
Nov 20 '05 #12
Nak
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"
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: William C. White | last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using cURL? Our website is hosted on a shared drive and the webhost company doesn't installed additional software (such as cURL)...
2
by: Albert Ahtenberg | last post by:
Hello, I don't know if it is only me but I was sure that header("Location:url") redirects the browser instantly to URL, or at least stops the execution of the code. But appearantely it continues...
3
by: James | last post by:
Hi, I have a form with 2 fields. 'A' 'B' The user completes one of the fields and the form is submitted. On the results page I want to run a query, but this will change subject to which...
0
by: Ollivier Robert | last post by:
Hello, I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9 system. The link succeeds but everytime I try to run php, I get a SEGV from inside the libcnltsh.so library. ...
1
by: Richard Galli | last post by:
I want viewers to compare state laws on a single subject. Imagine a three-column table with a drop-down box on the top. A viewer selects a state from the list, and that state's text fills the...
4
by: Albert Ahtenberg | last post by:
Hello, I have two questions. 1. When the user presses the back button and returns to a form he filled the form is reseted. How do I leave there the values he inserted? 2. When the...
1
by: inderjit S Gabrie | last post by:
Hi all Here is the scenerio ...is it possibly to do this... i am getting valid course dates output on to a web which i have designed ....all is okay so far , look at the following web url ...
2
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value...
3
by: Sandwick | last post by:
I am trying to change the size of a drawing so they are all 3x3. the script below is what i was trying to use to cut it in half ... I get errors. I can display the normal picture but not the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.