[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Creating a shortcut without a drive letter

Posted on 2007-08-11
1
Medium Priority
?
723 Views
Last Modified: 2012-08-13
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?
0
Comment
Question by:ahelgeson
1 Comment
 
LVL 3

Accepted Solution

by:
danis79 earned 500 total points
ID: 19676746
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
The article covers five tools all IT professionals should know about, as they up productivity by a great deal!
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question