Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
strDesktopPath = objShell.SpecialFolders("Desktop")
strAllDesktopPath = objShell.ExpandEnvironmentStrings("%allusersprofile%")&"\desktop"
DelShorts "shortcut to table.exe.lnk"
DelShorts "table.lnk"
Function DelShorts(strShortcutName)
If objFSO.FileExists(strDesktopPath & "\" & strShortcutName) then objFSO.DeleteFile strDesktopPath & "\" & strShortcutName
If objFSO.FileExists(strAllDesktopPath & "\" & strShortcutName) then objFSO.DeleteFile strAllDesktopPath & "\" & strShortcutName
End Function
|