> ## Content Index
> Fetch the complete content index at: https://blog.jsinh.in/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to create application shortcut programmatically using C#
- URL: https://blog.jsinh.in/how-to-create-application-shortcut-programmatically-using-csharp/
- Published: 2014-08-24T14:09:00.000Z
- Updated: 2026-07-07T15:10:20.000Z
- Author: Jsinh
- Tags: #Import 2026-10-04 19:16

So someday you might need to create shortcut of or in your application programatically.

Here is how you can do it:

A shortcut is basically a LINK to the original file / executable that will be called when the link / shortcut is clicked.

To create shortcut pro-grammatically, first you need add reference to `Windows Script Host Object Model` COM library in your project.

![Add reference to Windows Script Host Object Model](https://blob.jsinh.in/media/2014/08/24/SS01-CreateShortcutProgramatically.png)

Next add this using to your class - `using IWshRuntimeLibrary;`

Next code snippet to create shortcut:

```
var startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
var shell = new WshShell();
var shortCutLinkFilePath = Path.Combine(startupFolderPath, @"CreateShortcutSample.lnk");
var windowsApplicationShortcut = (IWshShortcut)shell.CreateShortcut(shortCutLinkFilePath);
windowsApplicationShortcut.Description = "How to create short for application example";
windowsApplicationShortcut.WorkingDirectory = Application.StartupPath;
windowsApplicationShortcut.TargetPath = Application.ExecutablePath;
windowsApplicationShortcut.Save();

```

Using above code, I create shortcut on my user's desktop.

First line gives me the path to the desktop of my user - using `Environment.SpecialFolder.Desktop`.

Next I create instance of `WshShell` class and build path for the shortcut I wish to create.

Then add the shortcut path to the `WshShell` instance and added description, working directory path (to my original application folder), target path (my application path) and saved the shortcut to desktop in final step.

Happy Coding !!