string dk =System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop);//得到桌面文件夹
IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShellClass();
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(@dk+" //a.lnk");
shortcut.TargetPath = @"C:/Program Files/Internet Explorer/IEXPLORE.EXE";
shortcut.Arguments = " http://localhost/2005/bay";
shortcut.Description = "My Shortcut";
shortcut.Hotkey = "CTRL+SHIFT+N";
shortcut.IconLocation = "notepad.exe, 0";
shortcut.Save();
IWshRuntimeLibrary.WshShell shell = new IWshRuntimeLibrary.WshShellClass();
IWshRuntimeLibrary.IWshShortcut shortcut = (IWshRuntimeLibrary.IWshShortcut)shell.CreateShortcut(@dk+" //a.lnk");
shortcut.TargetPath = @"C:/Program Files/Internet Explorer/IEXPLORE.EXE";
shortcut.Arguments = " http://localhost/2005/bay";
shortcut.Description = "My Shortcut";
shortcut.Hotkey = "CTRL+SHIFT+N";
shortcut.IconLocation = "notepad.exe, 0";
shortcut.Save();