Creating a shortcut without a drive letter

I am creating a program that will reside on a USB key. The program has a single EXE and multiple files that contain settings.

Here is the file structure:
      W:\Widget\Settings\program.exe
      W:\Widget\Settings\settings1.ini
      W:\Widget\Settings\settings2.ini
      W:\Widget\Settings\settings3.ini
      
I want to create a shortcut in W:\Widget\ for the EXE paired with the settings.

So in the shortcut (saved in W:\Widget) it would have:
  Shortcut: W:\Widget\Settings\program.exe settings1.ini
  Starting Folder: W:\Widget\
 
  (Same shortcut for settings2 and settings3)
 
So here's the problem:
When these are stored on a USB key, the drive letter can change on each computer.  In a shortcut, how can I create a shortcut without referencing a drive letter?

I tried .\ and ..\ and Windows won't let it work.

For example:
      Shortcut: .\Widget\Settings\program.exe settings1.ini
      Starting Folder: .\Widget\
      
      Doesn't work..

Any suggestions?
ahelgesonAsked:
Who is Participating?
 
danis79Commented:
Using batch files instead of shortcuts should solve your problem.

The following line in a .bat file located in \widget will start the program and pass the right parameter for settings 1.
@settings\program.exe .\settings\settings1.ini
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.