Microsoft KB Archive/244604

{|
 * width="100%"|

BUG: WBEM Namespace Picker Control Does Not Connect to WMI in Visual Basic IDE

 * }

Q244604

-

The information in this article applies to:


 * Windows Management Instrumentation, version 1.1
 * Microsoft Visual Basic Learning Edition for Windows, version 6.0
 * Microsoft Visual Basic Professional Edition for Windows, version 6.0

-

SYMPTOMS
When you use the WBEM Namespace Picker Control (WBEMNSPicker.ocx) on a Microsoft Visual Basic form in the Visual Basic IDE debug environment, pressing the Connect button fails to connect to Windows Management Instrumentation (WMI).

CAUSE
The current implementation of the WBEM Namespace Picker Control is incompatible with the Visual Basic IDE.

RESOLUTION
Although you cannot use the WBEM Namespace Picker Control when running in the Visual Basic IDE debug environment, the control functions properly from an EXE. Generate an EXE in order to use the control on a Visual Basic form.

STATUS
Microsoft has confirmed this to be a bug in Microsoft Windows Management Instrumentation, version 1.1.

Steps to Reproduce Behavior

 * 1) Create a Standard EXE project in Visual Basic.
 * 2) Include both the WBEM Login Control and the WBEM Namespace Picker Control ActiveX components.
 * 3) Add an instance of both of these components to a form.
 * 4) Add the following handler for the namespace picker control. In this code the login control is named Login1 and the namespace picker control is named NamespacePicker1.
 * 5) Run the program in the Visual Basic IDE debug environment.
 * 6) Click the computer icon to the right end of the namespace picker control.
 * 7) Click the Connect button in the Browse for Namespace dialog box. Nothing seems to happen.

To work around this problem:


 * 1) Generate an EXE for the preceding project.
 * 2) Run the EXE.
 * 3) Perform steps 6 - 7 in the preceding "Steps to Reproduce Behavior" section. A dialog box opens which prompts you for a username and password. This is the correct behavior.