www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
isComponentInstalled Method

Retrieves whether the specified component is available.

Syntax

bInstalled = clientCaps.isComponentInstalled(sID, sIDType [, sMinVersion])

Parameters

sID Required. A String that specifies a MIME type, ProgID, class identifier (CLSID), or component ID.
sIDType Required. A case-insensitive String that specifies the type of the identifier in sID. Must be one of the following values:
mimetypeA MIME type, such as application/cdf.
progidA ProgID string, such as WMPlayer.OCX.
clsidA CLSID, such as {6BF52A52-394A-11D3-B153-00C04F79FAA6} (Microsoft Windows Media Player).
componentidThe Active Setup component ID. See Detectable Components in Internet Explorer.
sMinVersion Optional. A String that specifies the minimum required version of the component. (Version numbers can contain only numerals, separated by commas.)

Return Value

Returns one of the following values:

trueThe component is installed, and its version number is greater than or equal to the specified sMinVersion.
falseThe component is not installed, or its version number is less than the specified sMinVersion.

Remarks

Only Microsoft Internet Explorer components are detected by this method. If a component identifier of a non-Microsoft component is specified, the method returns false.

Example

This example uses the isComponentInstalled method to determine whether the Microsoft virtual machine is installed.

<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all {
      IE\:clientCaps {behavior:url(#default#clientcaps)}
}
</STYLE>
</HEAD>

<BODY>
<IE:clientCaps ID="oClientCaps" />

<SCRIPT>
    bMSvmAvailable = oClientCaps.isComponentInstalled("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}",
    "ComponentID");
</SCRIPT>   

 :
</BODY>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

clientCaps

See Also

About Client Capabilities, Using DHTML Behaviors, compareVersions, getComponentVersion
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG