/// <summary> /// This method creates a shortcut on the user's <b>Desktop</b> using given /// shortcut name, description, the fully qualified executable path, a space /// separated list of additional arguments as well as an application's working /// directory. /// </summary> /// <remarks> /// The given executable's name is used if parameter <paramref name="shortcut"/> /// is not set. /// </remarks> /// <param name="shortcut"> /// The shortcut name to be used. This parameter is <b>optional</b>. /// </param> /// <param name="description"> /// The description of the shortcut to create. This parameter is <b>optional</b>. /// </param> /// <param name="executable"> /// The fully qualified executable path. This parameter is <b>mandatory</b>. /// </param> /// <param name="arguments"> /// The space separated list of additional arguments. This parameter is <b>optional</b>. /// </param> /// <param name="working"> /// The fully qualified working directory of the application. This parameter is /// <b>optional</b>. /// </param> public static void CreateDesktopShortcut(string shortcut, string description, string executable, string arguments, string working) { Shortcut.CreateShortcut(Environment.SpecialFolder.DesktopDirectory, executable, shortcut, description, working, arguments); }
/// <summary> /// This method creates a shortcut under the user's <b>Startup</b> menu using /// given shortcut name, description, the fully qualified executable path, a /// space separated list of additional arguments as well as an application's /// working directory. /// </summary> /// <remarks> /// The given executable's name is used if parameter <paramref name="shortcut"/> /// is not set. /// </remarks> /// <param name="shortcut"> /// The shortcut name to be used. This parameter is <b>optional</b>. /// </param> /// <param name="description"> /// The description of the shortcut to create. This parameter is <b>optional</b>. /// </param> /// <param name="executable"> /// The fully qualified executable path. This parameter is <b>mandatory</b>. /// </param> /// <param name="arguments"> /// The space separated list of additional arguments. This parameter is <b>optional</b>. /// </param> /// <param name="working"> /// The fully qualified working directory of the application. This parameter is /// <b>optional</b>. /// </param> public static void CreateStartupShortcut(string shortcut, string description, string executable, string arguments, string working) { Shortcut.CreateShortcut(Environment.SpecialFolder.Startup, executable, shortcut, description, working, arguments); }