FolderItem.IsLink property

Indicates whether the item is a shortcut.

This property is read-only.


bIsLink = FolderItem.IsLink

Property value

A Boolean that receives true if the item is a shortcut or false if not.


The following example uses IsLink to determine whether a particular object is a link. In this case, the object is a shortcut to Internet Explorer and so should return true. Proper usage is shown for JScript, VBScript, and Visual Basic.


<script language="JScript">
    function fnIsLinkJ()
        var objShell = new ActiveXObject("shell.application");
        var objFolder2;
        var ssfPROGRAMS = 2;
        objFolder2 = objShell.NameSpace(ssfPROGRAMS);
        if (objFolder2 != null)
            var objFolderItem;
            objFolderItem = objFolder2.ParseName("Internet Explorer.lnk");
            if (objFolderItem != null)
                var bReturn;
                bReturn = objFolderItem.IsLink;


<script language="VBScript">
    function fnIsLinkVB()
        dim objShell
        set objShell = CreateObject("shell.application")
        if (not objShell is nothing) then
            dim objFolder2
            dim ssfPROGRAMS
            ssfPROGRAMS = 2
            set objFolder2 = objShell.NameSpace(ssfPROGRAMS)
            if (not objFolder2 is nothing) then
                dim objFolderItem
                set objFolderItem = objFolder2.ParseName("Internet Explorer.lnk")
                if (not objFolderItem is nothing) then
                    dim bReturn
                    bReturn = objFolderItem.IsLink
                end if
                set objFolderItem = nothing
            end if
            set objFolder2 = nothing
        end if
        set objShell = nothing
    end function

Visual Basic:

Private Sub fnIsLinkVB()
    Dim objShell    As Shell
    Dim objFolder2  As Folder2
    Dim ssfPROGRAMS As Long
    ssfPROGRAMS = 2
    Set objShell = New Shell
    Set objFolder2 = objShell.NameSpace(ssfPROGRAMS)
        If (Not objFolder2 Is Nothing) Then
            Dim objFolderItem As FolderItem
            Set objFolderItem = objFolder2.ParseName("Internet Explorer.lnk")
                If (Not objFolderItem Is Nothing) Then
                    Dim bReturn As Boolean
                    bReturn = objFolderItem.IsLink
                    'FolderItem object returned nothing.
                End If
            Set objFolderItem = Nothing
            'Folder object returned nothing.
        End If
    Set objFolder2 = Nothing
    Set objShell = Nothing
End Sub


Minimum supported client

Windows 2000 Professional, Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]






Shell32.dll (version 4.71 or later)