Windows 7: Introduce commands for the run-command

0

Given Windows 7, you can press Win+R to open the command prompt.

How I introduce short cuts to execute commands? For example, I use Cygwin and would like to open a Cygwin terminal simpy by writing "terminal".

shuhalo

Posted 2015-07-29T15:24:28.683

Reputation: 175

Hmm. Typing terminal works for me. It shows Cygwin64 Terminal as a match. I can select and press enter ... – DavidPostill – 2015-07-29T15:37:58.633

I am talking about Win+R, not the search bar in the start menu. Does not work for me that way. – shuhalo – 2015-07-29T19:10:51.703

Answers

0

1) create a System Program Alias at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Management\System Programs

enter image description here To do this, navigate to the key and create a new "string variable" named whatever you want to type into "Run" (in your case, "terminal"):


2) create a registry key at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\terminal.exe

enter image description here

And within it, create a string variable called path with your command "C:\xxx\yyy\cgywin.exe terminal"

Once done, add the same path to the default item in the key.

  • Start > Run > "Terminal"
  • Terminal System Program references terminal.exe
  • terminal.exe fires your command in the App Paths Key.

Hope this helps.

Fazer87

Posted 2015-07-29T15:24:28.683

Reputation: 11 177

Do you know a reference that explains what those registry entries do? My desktop link passes the arguments " -i /Cygwin-Terminal.ico -". Furthermore, the desktop link leads to the home directory, whereas the registry entry now leads to the drive C: – shuhalo – 2015-07-29T19:08:02.787