Announcement

Collapse
No announcement yet.

Resolve shorcut?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resolve shorcut?

    Hello,

    Is is possible to retrieve information (e.g., the command line) from a shortcut file using the lua script of the installer or uninstaller? Any functions/actions?

    Thanks.

  • #2
    I have built a plugin which can retrieve the target and the arguments of shortcuts to files (not URLs). Here you can see it in use with a demo application built with AutoPlay Media Studio. Of course the same plugin can be used in Setup Factory 9.

    This is the script used for the button:

    Code:
    local tFile = Dialog.FileBrowse(true, "Select Shortcut", _DesktopFolder, "Shortcuts (*.lnk)|*.lnk|", "", "*.lnk", false, true);
    
    if (tFile[1] ~= "CANCEL") then
       local tShortcut = Utilities.GetLnkTarget(tFile[1]);
       error = Application.GetLastError();
       if (error ~= 0) then
          Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
       else
          Label.SetText("Target", tShortcut.Target);
          Label.SetText("Arguments", tShortcut.Arguments);
       end
    end
    If you are interested in this, please contact me privately on my site (see signature). No, this plugin is not free. Here is the documentation of this plugin.

    Ulrich
    Last edited by Ulrich; 6 days ago. Reason: Added a link to the help file for the plugin

    Comment

    Working...
    X