WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

WMI
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

WMI ObjectOpen Problem on Windows 95


Question:

I am getting a error when I try to open an object in Win95 or Win98.

Can we provide a way for these OS's to find this? Win2k has no problem...

Locator = ObjectOpen("WbemScripting.SWbemLocator")
Service = Locator.ConnectServer()
Errors occur on the "Service = ... " line.

The difference between Win2k and Win95 was in this line:

modem = ObjectCollectionNext(hEnum)
value => 0
.. for Win95, but for Win2k
value => 33337
Why would value = 0, on Windows 95?

Answer:

First, Make sure you have the WMI operating system core components installed.

Here are the WMI System Requirements:

The WMI operating system core components are supported on Windows NT 4.0 with Service Pack 4 or later, including Windows 2000/XP, and on Windows 95 OSR2 and Windows 98.

The WMI infrastructure consists of the following components:

Where do I get WMI?

For Win95, 98, and NT 4.0, if WMI is not already installed, you can download the Windows Management Instrumentation (WMI) CORE 1.5 from Microsoft at: http://msdn.microsoft.com/downloads/sample.asp?url=/MSDN-FILES/027/001/576/msdncompositedoc.xml&frame=true

It is strange that on Win95 the ObjectCollectionNext is returning zero! The function ObjectCollectionNext returns an OLE object handle (i.e. 33337) representing the next item in the collection, or 0 (zero) when finished enumerating the collection.

User response:

Thanks a lot! That did it for Win98, but for Win95 I did not get anything in my list of modems though I have one sitting in the PCMCIA slot. Any idea why this might be?

Reply:

Not really sure at this point. It would seem that there are no modem items in that collection.

A quick search out at microsoft came up with this:

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B285895

SYMPTOMS
When you attempt to retrieve instances from the Windows Management Instrumentation (WMI) Win32_POTSModem and Win32_POTSModemToSerialPort classes in Windows 95 or Windows 98, no instances are returned.

CAUSE
This problem occurs because the WMI provider does not retrieve Telephony API (TAPI) information.

RESOLUTION
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem.


Article ID:   W16279
File Created: 2004:03:30:15:43:44
Last Updated: 2004:03:30:15:43:44