Tag Archives: shortcut

Create shortcut programmatically in C#

In cases where we need to create a shortcut for our application or for any other reason, the Windows Script Host Object Model library allows us to do just that.

In order to access the classes that will enable us to create shortcuts we need to add the Windows Script Host Object Model library as a reference to our project first.

  1. Right click on your project
  2. Click “Add Reference…”
  3. Select the “COM” tab on the left
  4. Search for Windows Script Host Object Model and add it as a reference

Windows Script Host Object Model add reference

After you successfully add the reference in your project you should be able to use the snippet bellow to create shortcuts as you please.

Create shortcut:

Usage: