View Full Version : How do I Find All Shortcuts to a File Name
RichCPT
11-25-2008, 03:56 PM
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?
linder
11-26-2008, 01:30 AM
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
RichCPT
11-26-2008, 11:53 AM
Yes, those sound like the two functions I needed. ("Handle File Listing..." and "Get File Information->Shortcut Target") Thanks.
linder
11-26-2008, 12:59 PM
Great! If you need any help, just let us know.
Friedrich
RichCPT
12-24-2008, 11:21 AM
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.