+ Reply to Thread
Results 1 to 5 of 5

Thread: How do I Find All Shortcuts to a File Name

  1. #1

    Default How do I Find All Shortcuts to a File Name

    How can I find all shortcuts created by a user that point to a specific file name and then compare the target folder paths in the shortcuts?

  2. #2
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How do I Find All Shortcuts to a File Name

    Hello,

    One idea is to load all shortcut files (.lnk) from a specific location into a queue (you can use the "Handle File Listing..." function) and then retrieve the target for each file (you can use Get File Information->Shortcut Target function).

    Does this help?

    Friedrich

  3. #3

    Default Re: How do I Find All Shortcuts to a File Name

    Yes, those sound like the two functions I needed. ("Handle File Listing..." and "Get File Information->Shortcut Target") Thanks.

  4. #4
    Join Date
    Mar 2004
    Posts
    4,307

    Default Re: How do I Find All Shortcuts to a File Name

    Great! If you need any help, just let us know.

    Friedrich

  5. #5

    Default Re: How do I Find All Shortcuts to a File Name

    My final solution is attached in sample scripts. It's not very elegant and it uses a lot more code than I'd prefer. To run the scripts unzip the three .SBI files to your INCLUDE folder and the one .SB6 file to your projects folder. Edit lines 22 and 23 of the .SBI file to include an .exe name of your application and some other file that is included in your application. Create multiple installation folders of your application and then create shortcuts to them. Compile and run the script. A progress bar will display as it searches the following shortcut paths: 1) Quick Lanuch for current user, 2) desktop for current user, 3) START menu for current user, 4) common desktop, 5) common START menu. It will then display two listbox dialogs. The first will show the unique path names that it found your application in and the second will show the actual shortcuts and where they point to. The code does not find "ALL" shortcuts to your app, as it only searches shortcuts for the current user and the group common to all users.
    -Rich
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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