$theTitle=wp_title(" - ", false); if($theTitle != "") { ?>
About Virtualization, VDI, SBC, Application Compatibility and anything else I feel like
Installers can create so called Advertised Shortcuts in the Start Menu. I wanted to check the Target Path of such an shortcut but Explorer doesn’t show it:
But we can easily retrieve the path using a small VB Script:
1 2 3 4 5 6 7 8 | Option Explicit Dim WshShell : Set WshShell = WScript.CreateObject("Wscript.Shell") Dim objShortcut : Set objShortcut = WshShell.CreateShortcut(WScript.Arguments(0)) WScript.Echo("Target Path : " & objShortcut.TargetPath & vbCrLf & _ "Icon Location: " & objShortcut.IconLocation) Set objShortcut = Nothing Set WshShell = Nothing |
The scripts accepts the shortcut filename as a parameter so you can simply drag the shortcut to the script and it will show the Target Path and Icon Location:
Bonus Chatter: if you want to prevent an installer from creating Advertised Shortcuts set the DISABLEADVTSHORTCUTS MSI property to 1 (MsiExec /I MyMsi.msi DISABLEADVTSHORTCUTS=1).
One Response for "Get the location of an advertised shortcut"
Gret ascript but it bombs out subscript out of range line 5 char 19
Leave a reply