I am looking to automatically delete a shortcut that is created in Windows Vista when we install a program via MSI. The following code works perfectly in Windows XP, however errors out in Vista.
For Vista, the equivalent variable should be:
strShortcut = "C:\Users\Public\Public Desktop\FILENAME.lnk"
Ideally, I would like to use one script to handle both XP and Vista without prompting users or alerting them of its presence.
Offering more points for faster resolution as I need this solved as quickly as is humanly possible.
Set objFSO = CreateObject("Scripting.FileSystemObject")
strShortcut = "C:\Documents and Settings\All Users\Desktop\FILENAME.lnk"
If objFSO.FileExists(strShortcut) Then