I have this script
Dim query As New ManagementObjectSearcher("Select * from Select * from
Win32_Product")
Debug.Write(query.Get().Count)
For Each mo As ManagementObject In query.Get
Me.ListBox1.Items.Add(mo("Name"))
Next
but it returns nothing, however other WMI scripts work fine...This should
list all the software instaled on a system. Why does it return nothing? 5 9006
Hi,
I never have had any problems with using Win32_Product. I would suspect
it has something to do with your query.
Select * from Select * from Win32_Product
Should be
Select * from Win32_Product
Ken
-------------------------
"Brian Henry" wrote: I have this script
Dim query As New ManagementObjectSearcher("Select * from Select * from Win32_Product")
Debug.Write(query.Get().Count)
For Each mo As ManagementObject In query.Get
Me.ListBox1.Items.Add(mo("Name"))
Next but it returns nothing, however other WMI scripts work fine...This should list all the software instaled on a system. Why does it return nothing?
whoops i retyped it wrong..
has nothing to do with the query, In code it is only "select * from
Win32_Product", what happens is when i step through it line by line, when it
hits this line
For Each mo As ManagementObject In query.Get
the execution of the sub just stops and it jumps out of the sub... execute
query.get on its own line and the same thing happens, no code is executed
after that statement in the sub... (this is on win xp pro 64-bit edition, in
..NET 2.0) so when i step to that line .. press the button for stepping on
the line to step again it just jumps from that line and out of the sub... im
just confused... when i do any other WMI query they execute perfectly fine..
fixed it turned out WMI isnt installed on 64bit windows xp by default
*rolles eyes* because its based on windows server not xp..
"Brian Henry" <no****@nospam.com> wrote in message
news:OD**************@TK2MSFTNGP12.phx.gbl... whoops i retyped it wrong..
has nothing to do with the query, In code it is only "select * from Win32_Product", what happens is when i step through it line by line, when it hits this line
For Each mo As ManagementObject In query.Get
the execution of the sub just stops and it jumps out of the sub... execute query.get on its own line and the same thing happens, no code is executed after that statement in the sub... (this is on win xp pro 64-bit edition, in .NET 2.0) so when i step to that line .. press the button for stepping on the line to step again it just jumps from that line and out of the sub... im just confused... when i do any other WMI query they execute perfectly fine..
Brian,
The WMI is installed with xp pro x64. I really dont understand
why it is not working on your system because the code ran fine on my xp x64
pro system.
Ken
---------------
"Brian Henry" <no****@nospam.com> wrote in message
news:eB**************@TK2MSFTNGP11.phx.gbl... fixed it turned out WMI isnt installed on 64bit windows xp by default *rolles eyes* because its based on windows server not xp..
"Brian Henry" <no****@nospam.com> wrote in message news:OD**************@TK2MSFTNGP12.phx.gbl... whoops i retyped it wrong..
has nothing to do with the query, In code it is only "select * from Win32_Product", what happens is when i step through it line by line, when it hits this line
For Each mo As ManagementObject In query.Get
the execution of the sub just stops and it jumps out of the sub... execute query.get on its own line and the same thing happens, no code is executed after that statement in the sub... (this is on win xp pro 64-bit edition, in .NET 2.0) so when i step to that line .. press the button for stepping on the line to step again it just jumps from that line and out of the sub... im just confused... when i do any other WMI query they execute perfectly fine..
strange, on mine when I added WMI under the list of managment objects I
could install in add programs for windows, it started to work, removed it,
it stoped working...
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:ug**************@TK2MSFTNGP11.phx.gbl... Brian,
The WMI is installed with xp pro x64. I really dont understand why it is not working on your system because the code ran fine on my xp x64 pro system.
Ken --------------- "Brian Henry" <no****@nospam.com> wrote in message news:eB**************@TK2MSFTNGP11.phx.gbl... fixed it turned out WMI isnt installed on 64bit windows xp by default *rolles eyes* because its based on windows server not xp..
"Brian Henry" <no****@nospam.com> wrote in message news:OD**************@TK2MSFTNGP12.phx.gbl... whoops i retyped it wrong..
has nothing to do with the query, In code it is only "select * from Win32_Product", what happens is when i step through it line by line, when it hits this line
For Each mo As ManagementObject In query.Get
the execution of the sub just stops and it jumps out of the sub... execute query.get on its own line and the same thing happens, no code is executed after that statement in the sub... (this is on win xp pro 64-bit edition, in .NET 2.0) so when i step to that line .. press the button for stepping on the line to step again it just jumps from that line and out of the sub... im just confused... when i do any other WMI query they execute perfectly fine..
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike Daniel |
last post by:
I am attempting to use document.write(pageVar) that displays a new html page
within a pop-up window and the popup is failing. Also note that pageVar is
a complete HTML page containing other java...
|
by: Steve Long |
last post by:
Hello,
can someone help me figure out how to do a couple of things here? I would
like to use the Uninstall method of the Win32_Product class and am having
trouble figuring this one out.
When I do...
|
by: Water Cooler v2 |
last post by:
Questions:
1. Can there be more than a single script block in a given HEAD tag?
2. Can there be more than a single script block in a given BODY tag?
To test, I tried the following code. None...
|
by: bilaribilari |
last post by:
Hi all,
I am using Tidy (C) for parsing html pages. I encountered a page that
has some script as follows:
<script>
....
var abc = "<script>some stuff here</" + "script>";
....
</script>
|
by: thisis |
last post by:
Hi All,
i have this.asp page:
<script type="text/vbscript">
Function myFunc(val1ok, val2ok)
' do something ok
myFunc = " return something ok"
End Function
</script>
|
by: rsteph |
last post by:
I have a script that shows the time and date. It's been working on my site for quite a while now. Suddenly it stops showing up, after getting my drop down menu to work.
If I put text between the...
|
by: DKn |
last post by:
Hi all,
I am trying to do Software upgradation using Win32_Product -Upgrade method in C#.Net.
Here is the code.
using System;
using System.Management;
using System.Windows.Forms;
|
by: DKn |
last post by:
Hello All,
I am doing one .Net C#.Net 2.0 Windows appliaction.
In that I am displaying the installed products information by using win32_Product class in a ListView Control. it is diplaying...
|
by: KevinADC |
last post by:
Note: You may skip to the end of the article if all you want is the perl code.
Introduction
Many websites have a form or a link you can use to download a file. You click a form button or click...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |