ShortExe 1.01 - by Horst Schaeffer
----------------------------------
Generic Shortcut gimmick for removable media (flash drive/card).

Windows insists that a shortcut target must have a fixed drive letter, which means you cannot use Windows shortcuts on a USB flash drive where the drive letter may change.

Here comes ShortExe.
The idea is to have a little program that you rename to something which will be interpreted (by the program itself) as shortcut information. The drive letter need not be specified, because the shortcut knows it.

Example (running on H:)
original name:        "Short.exe"
renamed to:           "Qsel +some+where.exe"
resulting shortcut:   "H:\some\where\Qsel.exe"

The program name (without the ".exe" extension!) is placed at the beginning to make the shortcut easy to identify. Space separates from the path information.

Since the backslash character is not allowed in a file name, you have to use the plus (+) sign instead. ShortExe also treats single quote marks around the path as double quote marks (in case your path includes spaces).

Example:          Qsel '+my tools+launcher'.exe         
will produce:     "H:\my tools\launcher\Qsel.exe"

Anything that succeeds the path will be regarded as command arguments. A dash (-) can be used instead of a slash (/), and also single quote marks will be replaced by double quote marks.

Example:          Qsel +tools+launcher -hide.exe        
will produce:     "H:\tools\launcher\Qsel.exe" /hide

Notes:

The working directory ("Start in.." in Windows shortcut properties) will always be set to the directory of the shortcut target.

Important when renaming: The shortcut itself is an EXE file, and its extension must be preserved!

Reserved characters: ShortExe cannot be used, if there are plus or quote mark characters in the real command and path, or a dash in the real command tail.

The path information in the shortcut name is actually completed based on the directory where the shortcut sits (which is not relevant, if it is in the root directory, or if the shortcut begins with a backslash/plus).

+++

Ver 1.01, 02 Sep 2010: RunProgram statement changed to avoid false positive alert (avast!)

* 02 Sep 2010
mailto:horst.schaeffer@gmx.net
