Windows XP Create Console Shortcuts for Applications

1

I have become a fervent console user since I began using the linux shell in my daily workflow.

I want to be able to call "C:\Program Files\Application\Application.exe" as application from the command line where the application is any arbitrary application. I know that I can use the PATH environment variable for this; however, I would prefer not to pollute my environment variable space more than it should be (since I have over 10 applications that I would like to create shortcuts for).


Edit: Should have mentioned earlier that I would also like the shortcuts to be compatible with MinGW as well.

Gio Borje

Posted 2011-02-28T20:23:22.493

Reputation: 395

Answers

4

Aliases are available for the NT Command Prompt through the doskey command:

doskey word="%ProgramFiles%\Windows NT\Accessories\wordpad.exe" $*

You may now use the alias instead of the (full) name of the executable:

word %SystemDrive%\boot.ini

RolKau

Posted 2011-02-28T20:23:22.493

Reputation: 826

FYI, this works for any program that uses Win32 Console windows – not just cmd.exe. (My guess for MinGW is doskey/exename=bash.exe.) – user1686 – 2011-03-01T13:32:53.633

2

Create a folder, e.g. C:\apps, and place links to your applications there.

Add that folder to your %PATH%.

Then, change %PATHEXT% so you don't have to type the .lnk extension every time:

set PATHEXT=%PATHEXT%;.lnk

(You can edit environment variables in System in Control Panel)

Daniel Beck

Posted 2011-02-28T20:23:22.493

Reputation: 98 421

.lnk files don't work for MinGW. – Gio Borje – 2011-02-28T20:54:56.040

1

I suppose you could put shortcuts (or batch files that simply 'call') to those applications in %systemroot%

Mark Sowul

Posted 2011-02-28T20:23:22.493

Reputation: 2 877