MSI.GetShortcutTarget

table MSI.GetShortcutTarget ( 

string ShortcutTarget )

Example 1

-- Get the path to the shortcut file.
strShortcutFolder = Shell.GetFolder(SHF_DESKTOP);
strShortcutFolder = strShortcutFolder.."\\MyShortcut.lnk";

-- Get the shortcut product information.
tbShortcutInfo = MSI.GetShortcutTarget(strShortcutFolder);

-- Show the information in a dialog message.
if (tbShortcutInfo) then
    strMessage = "The shortcut information is as follows:\r\n\r\n";
    strMessage = strMessage.."Product Code: "..tbShortcutInfo.ProductCode.."\r\n";
    strMessage = strMessage.."Feature ID: "..tbShortcutInfo.FeatureID.."\r\n";
    strMessage = strMessage.."Component Code: "..tbShortcutInfo.ComponentCode.."\r\n";
    Dialog.Message("Shortcut Info", strMessage);
else
    -- Show an error message
    Dialog.Message("Error", "Could not get shortcut info.");
end

Gets product information from a shortcut file and shows it in a dialog message, or if the action fails, an error message is shown.

See also:  Related Actions