User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: How To Extract The Target of A Shortcut (.lnk) File

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    200
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    How To Extract The Target of A Shortcut (.lnk) File

    Does anyone know how to find the actual target of a .lnk file (a windows shortcut) in code?

    Thanking Ye

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use the "IShellLink" extension.

    Load the lnk file and then you can get the location from getRawPath$( "IShellLink" )

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    200
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Decal View Post
    You can use the "IShellLink" extension.

    Load the lnk file and then you can get the location from getRawPath$( "IShellLink" )
    Hi, Thanks but this doesn't seem to return anything for me. It just returns an empty string. Anything else special I need to do?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Strange, it works perfectly for me. Did you remember to load the lnk file before you do the action to set the string to getRawPath?

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    200
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Decal View Post
    Strange, it works perfectly for me. Did you remember to load the lnk file before you do the action to set the string to getRawPath?

    Yes. Her is the code

    + Only one action when event loops
    IShellLink load from file="C:\Users\Public\Desktop\Advanced SystemCare Ultimate 12.lnk"
    the timer : Fire event "ttt" after 01''-30


    + On timer event "ttt"
    Special : Send "You dropped file target : " + getRawPath$( "IShellLink" ) to output window

    ..and the output window just shows "You dropped file target :"

    I tried it with lots of different shortcut files and with or without a delay but each time it returns the emplty string.
    I'm running this directly from the editor in version 292.8.

    Perhaps I need to be running as admin or something?

    Any chance you could send me an example that works so I can try at my end?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    200
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    It gives me the following error code when I do an "On Error" Check:

    -2147024891

    But what does it mean?

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    200
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by grimmy View Post
    It gives me the following error code when I do an "On Error" Check:

    -2147024891

    But what does it mean?
    Ah the hex version of this code is 0x80070005
    so, I have traced this error to a 'general access denied' error according to https://docs.microsoft.com/en-us/ope...3-3918024b10b8

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did the exact same as you just wrote and to me it worked fine.
    I loaded a shortcut "GZdoom.lnk" on my desktop and after the output window returned this: "D:\gzdoom-bin-3-4-1-x64\gzdoom.exe" which is exactly where the shortcut points.

    Maybe you have an outdated version of IShellLink, maybe go to the extension manager, find the IShellLink and click reinstall and see if it works after that.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro

    Join Date
    Apr 2008
    Posts
    200
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Decal View Post
    I did the exact same as you just wrote and to me it worked fine.
    I loaded a shortcut "GZdoom.lnk" on my desktop and after the output window returned this: "D:\gzdoom-bin-3-4-1-x64\gzdoom.exe" which is exactly where the shortcut points.

    Maybe you have an outdated version of IShellLink, maybe go to the extension manager, find the IShellLink and click reinstall and see if it works after that.

    Thanks. I updated my version of Fusion to the latest (292.10) and everything is working fine. Hoorah!

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    325
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's good to hear

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Create a file shortcut..how?
    By grimmy in forum Fusion 2.5
    Replies: 1
    Last Post: 6th June 2019, 02:45 PM
  2. Extract number from line in file
    By JulianMS in forum Fusion 2.5
    Replies: 4
    Last Post: 20th September 2016, 03:20 PM
  3. Find Target from .lnk file
    By Bipolar_Games in forum Fusion 2.5
    Replies: 2
    Last Post: 13th July 2014, 01:25 AM
  4. Are there any MMF2 objects which can decompress/extract CAB file contents?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th December 2011, 01:25 AM
  5. Shortcut of an "Not installed" file
    By Matto in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 16th December 2006, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •