Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example when you execute

c:\> notepad

then a new notepad window opens. How can I create a custom shortcut for my application?

share|improve this question
up vote 10 down vote accepted

Executing notepad isn't a shortcut, it's just launching an executable by name.

To find this executable, the prompt makes use of the following two environment variables:

  • Path, which by default contains the folder where notepad.exe is (usually %windir%\system32\notepad.exe)
  • PATHEXT, which by default contains .EXE (and more common executable file extensions)

To see the content of those variables, you can execute echo %Path% or echo %PATHEXT%, or press the Windows+Pause key combination, then go to Advanced system settings and choose Environment variables. You can also change their value this way.

To create a shortcut for an executable that you can use in the prompt, you could for instance:

  1. create a shortcut to your application (using the normal "create shortcut" context menu entry,
  2. add .lnk in your PATHEXT variable,
  3. and add the folder containing your shortcut in your Path variable (or move the shortcut in a standard location, such as C:\Windows\System32)
share|improve this answer
Thx, it work for me. This is good article about that… – Mariusz May 21 '14 at 12:29

Most applications have an executable named as C:\Program Files\<appname>\<something>.exe. This isn't in the standard system path. This is because nothing happens if you type in f.e. firefox.

Your possibilities to fix that:

  • extend your PATH with the needed directory. It isn't really good solution, because it extends the system path only for a single executable to be made reachable.
  • you create wrapper, for example in C:\Mariusz\bin\firefox.bat, which stands only from this (example):

    C:\Program Files (x86)\Firefox\Firefox.exe

Of course you can have in this C:\Mariusz\bin directory as many batch wrappers as you wish.

share|improve this answer

One simple way, is to simply put the application in %systemroot% This is how Windows commands generally work for example. Ping.exe is in the %systemroot%\System32 and SysWOW64 or c:\Windows\System32 and C:\Windows\SysWOW64 directory so that when you can ping or ping.exe you can ping remote servers or hosts.

share|improve this answer
I can't put there my application. I tried with shortcut but doesn't work – Mariusz May 21 '14 at 11:45
@Mariusz - Please provide more information then simply "I can't" what specific errors messages do you get? – Ramhound May 21 '14 at 12:04
Putting something in the system root folder would work (because this folder is included in the PATH environment variable) but it isn't a sensible solution - you don't want to clog up your \Windows folders with non-OS files. – CJM May 21 '14 at 12:13
@Ramhound it to big application, it isn't one exe file but about 600 files and folders – Mariusz May 21 '14 at 12:32
@CJM you are correct, one small file here or there is not an issue. However with the comment here from Mariusz... You don't want a full blown package there, ever. – AthomSfere May 21 '14 at 13:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.