WshShell shell = new WshShell(); string shortcutAddress = des_cmb.Text + @"\" + name_txt.Text + ".lnk"; IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutAddress); shortcut.Description = comment_txt.Text; //shortcut.Hotkey = "Ctrl+Shift+N"; shortcut.Arguments = args_txt.Text; shortcut.WindowStyle = 1;//1 normal, 3 maximize, 7 minimize switch (style_cmb.SelectedIndex) { case 0: { shortcut.WindowStyle = 1; break; } case 1: { shortcut.WindowStyle = 3; break; } case 2: { shortcut.WindowStyle = 7; break; } } shortcut.IconLocation = fileIcon; shortcut.WorkingDirectory = Path.GetDirectoryName(targetpath_txt.Text); shortcut.TargetPath = "\"" + targetpath_txt.Text + "\""; shortcut.Save();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)