Wednesday, August 11, 2010

How to create a shortcut command for any application? Here comes the trick

Microsoft has a registry path for storing all the shortcut commands for the exe’s. These shortcut commands can be typed from the “Windows Run” window, so that particular application will get opened.

Registry Path: HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths

Suppose if you like to create a shortcut command in your name, create a registry key of your name under the above mentioned path and the value for the registry entry shall be the path of exe which you want to run when the command is called in Run window.

Let’s see this with an example:

I would like to create a shortcut command for my application (D:\My Proj\MyApp.exe). Let us name the shortcut command as MyApp. Now I will create a registry entry name MyApp.exe in the registry path HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths and the default value for that entry shall be the path of my exe “D:\My Proj\MyApp.exe”. Once you created this entry in the registry open the Run window and type MyApp and press enter. MyApp.exe application will get opened.

1 comment:

Mr.Chubby said...

Cool post siva... What you have said is a nice info for developers... For a normal windows user who hesitates to tweak the registry, here is another way. Just create a shortcut of the application in any location. i.e right click the exe--> Send to Desktop. Now a shortcut will be created in the desktop. Now rename the created shortcut so that it doesnot have any blankspaces or special characters. Now copy that shortcut and paste it in C:\Windows\System32... Thats it, your application is available through "Run" dialog... Just checkout this trick... :) Happy Blogging....