By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,288 Members | 1,243 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,288 IT Pros & Developers. It's quick & easy.

Invalid Namespace

P: n/a
I have a program that is being used by many users, but one is getting an
exception of "Invalid Namespace". I have no idea why or how to fix this
problem. The following is the code that is being used:

Dim disk As New System.Management.ManagementObject

The error is occuring on the .Get function. The user is running Windows98,
and I had to run the wmi9x.exe file to get WMI installed. Could the WMI be
some how corrupted and if so, how can it be fixed, would running the
wmi9x.exe file again fix this problem? I am not sure if the user is running
Windows 98 or Windows 98 Second Edition, does WMI work on plain Win98 or only
on Second Edition and up?

Any info about this error and how to fix it would be greatly appreciated.

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
This page is for the WMI download for Windows 95/98/98 SE:

Direct link to the file (3029 KB):

You need to be running Internet Explorer 5 or above


I created a simple project in VB.NET 2003:

1) Start a new Windows application

2) Add a reference to the System.Management DLL

3) Add the following inport:

Imports System.Management

4) Add a button, double-click it & paste in the following code:

Dim mo As New ManagementObject( "Win32_LogicalDisk.DeviceId='C:'")
Dim ulngFreeSpace As UInt64 = CType(mo("FreeSpace"), UInt64)

5) Run it. The result is irrelevant, but it just to see if it works on the
Windows 98 machine

I hope this helps

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.