I can't figure out how to create shortcuts that don't care where they are mounted. For example, on my flash drive, I want to run CCleaner or Notepad++ in my college classroom. The problem is, a shortcut (at least with default settings) doesn't work reliably because it is tied to the same drive it was created on. Is there a way to do something like in HTML?


Here is where the actual program is:

Root\Portable Applications\Program Data\CCleaner\ccleaner.exe

Here is where I want the shortcut to be:

Root\Portable Applications\CCleaner.lnk

U3/Portable Apps/etc is not the solution I am looking for

Edit: The Versions of Windows will be XP 32 bit, Vista 64 bit, and Vista 32 bit


You can use mklink if on Vista or later to create symbolic links. They can be pointed to wherever you want. Alternatively a batch file as pointed out by pelms would work as well.

| improve this answer | |
  • Hi John, thank you for your reply. When I try to use mklink, I get the error message, "The device does not support symbolic links." After a quick search, mklink isn't for FAT filesystems. If there are no other options, I will switch to NTFS for my thumb drive. Thank you again John for your answer. – Dan Aug 23 '09 at 7:22
  • 2
    Junctions are not the same as symlinks. Junctions can only point to directories, and work in a different way. Real Unix-like symlinks were added only in Vista. – user1686 Aug 23 '09 at 10:09

Instead of using a shortcut you could create a batch file that uses a root relative path to the exe file.
e.g. for your example

@start "" "\Portable Applications\Program Data\CCleaner\ccleaner.exe"

The batch file should then work from anywhere on the USB drive, whatever the drive letter.

| improve this answer | |
  • You can even change the icon if you want. don't know the portability of that. – Dykam Aug 23 '09 at 17:55
  • 2
    @Dykam. Can you change the icon for a .bat file without using Dan's method..? – pelms Aug 23 '09 at 19:29

Ok thank you guys for your replies. Here is what I ended up doing for any interested. pelms idea to use a batch file is almost it. (A Very good idea, thank you pelms) What I did was just make an AutoIt script that runs the apps in directories below it. Then I just compiled it with an extracted .ico from each executable file so everything looked pretty. Thanks again John and pelmsd

Run ('Program Data\PDF X-Change\PDFXCview.exe')

That is all the script consists of. Thanks again guys, I have linked the two programs I used if anyone is interested



| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.