Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to create a shortcut to an EXE on a USB thumb drive that will work no matter what drive letter is assigned to the thumb drive?

I have a program in a folder on a thumb drive. I want to create a shortcut in the root of the thumb drive that points to the program's EXE and will work no matter what drive letter is assigned to the thumb drive.

How can I do this?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

You should be able to leave off the drive letter to create a relative pathname. For example, if your executable is at:

E:\folder\subfolder\program.exe

set the shortcut to be:

\folder\subfolder\program.exe

or perhaps:

folder\subfolder\program.exe

A bit of experimentation should reveal the correct format.

share|improve this answer
    
Relative is the way to go, +1. –  John T Feb 24 '10 at 23:25

We can also use batch files to achieve relative links.
Just put,

start path/to/program.exe

and put it in the root of the flash drive..
I am not sure if relative shortcuts(lnk files) can be used in windows...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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