引用COM组件Windows Script Host Object Model,创建快捷方式
2004-12-27 08:22
423 查看
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();
相关文章推荐
- Windows下c++创建快捷方式
- Atitit.创建快捷方式 windows快捷方式的原理
- Windows Moible 5 Config(内部资料) 配置三 创建快捷方式
- 在Windows桌面创建快捷方式
- Atitit.创建快捷方式 windows快捷方式的原理
- 使用 Windows Scripting Host 中的 WshShortcut 获取快捷方式的信息
- Windows 中如何创建一个指向某相对路径的快捷方式(即快捷方式的目标路径为某相对路径)
- 用VB创建Windows快捷方式(无需DLL)
- windows命令行创建各种快捷方式
- 给windows应用程序创建快捷方式
- windows -- 怎么创建一个网页快捷方式
- windows创建快捷方式和快捷网站链接
- C++创建和解析Windows快捷方式文件lnk的程序
- vc++ windows 创建桌面快捷方式
- Windows下c++创建快捷方式
- Windows应用程序快捷方式创建工具
- 如何在windows中创建到活动目录的快捷方式
- linux使用ln命令创建链接,如windows的快捷方式功能
- windows无法创建快捷方式 请检查磁盘已满
- Windows 7任务栏图标 创建快捷方式