3

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?

quack quixote
  • 43,504

2 Answers2

6

I earlier versions of Windows you could leave off the drive letter to create a relative pathname. Unfortunately this doesn't seem to be possible any more with Windows 10.

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.

ChrisF
  • 41,540
5

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...

asdfg
  • 2,936