Dim $objShell, $objFSO, $sonicPath, $fileFolder
Dim $userFolder, $desktopFolder, $custFolder, $extension
Dim $fullname, $shortcut, $shortTarget
$paragonPath = "C:\Program Files\Paragon93\"
$objShell = CreateObject("WScript.Shell")
$objFSO = CreateObject("Scripting.FileSystemObject")
$fileFolder = $objFSO.GetFolder("C:\Documents and Settings")
$subFileFolder = $fileFolder.Subfolders
For Each $userFolder in $subFileFolder
If $objFSO.FolderExists($userFolder + "\Desktop")
$desktopFolder = $objFSO.GetFolder($userFolder + "\Desktop")
$custFolder = $desktopFolder.Files
For Each $custFile in $custFolder
$extension = $objFSO.GetExtensionName(LCase($custFile.name))
If $extension = "lnk"
;Find full path of shortcut
$fullname = $objFSO.GetAbsolutePathName($custFile)
;Find full path of target within shortcut
;See http://www.devguru.com/Technologies/wsh/quickref/wshshell_CreateShortcut.html
;for more information on how this works.
$shortcut = $objShell.CreateShortcut($fullname)
$shortTarget = $shortcut.TargetPath
If InStr($shortTarget, $paragonPath)
Dim $myFileToDelete
$myFileToDelete = $objFSO.GetFile($fullname)
$myFileToDelete.Delete
EndIf
EndIf
Next
EndIf
Next