Not really sure how any of this is working...

You're using DirList with no optional arguments; specifying a full path, but getting back file names; and exepect to find a "file" that you found in "path" without looking in "path\file"??? You're also returning a list of ALL files, not just shortcuts.

The way you're defining DirList("path"), you're getting an array of FILE NAMES - ie: "Word", "Excel", and so on. When you call the GetShortcutProperties UDF, you pass this name, but not the path, so the UDF has no clue where to look. You have two choices to make this work - add the path to the GetShortcutProperties UDF, or specify the optional arg in DirList to return full paths.

Here's a working example, with comments and debugging messages:
 Code:
Dim $List	; array of LNK files
Dim $Lnk	; array enumerator
Dim $Path	; target path

; Get list of LNK files (shortcuts), returning full paths
$List = DirList('%USERPROFILE%\Desktop\*.lnk', 2)

; Enumerate the array
For Each $Lnk in $List
  'Processing ' $Lnk ?
  $Path = GetShortCutProperties($Lnk, 'Path')
  'Path: ' $Path ?
  If Instr($Path, 'IExplore.exe')
    'Found Explorer!' ?
  Else
    'Explorer was not found' ?
  EndIf
Next

Try this script WITHOUT the "2" argument in DirList and you'll see why GetShortcutProperties won't work reliably. Also, using "%USERPROFILE%" is recommended over hard coding the documents path, although you might need to change the "desktop" reference.

I searched for Explorer, since that is a link I had on my desktop. I'd suggest you start there and then modify your code.

Also - from a command prompt, run "DIR %USERPROFILE%\Desktop" and see what file names are returned - you might be surprised. ;\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D