摘要: 用WSH直接创建快捷方式:1.首先要添加引用.添加引用的方法非常简单,右击你的项目并选择添加引用,选择 COM 选项卡并选择 Windows Script Host Object Model2.引用命名空间using System.Runtime.InteropServices;//互动服务using IWshRuntimeLibrary;3.创建快捷方式(注释中有详细说明)//实例化WshShell对象WshShell shell = new WshShell();//通过该对象的 CreateShortcut 方法来创建 IWshShortcut 接口的实例对象IWshShortcut s 阅读全文
posted @ 2013-04-11 18:48 Jason.Lau 阅读(607) 评论(0) 推荐(0) 编辑
摘要: set WshShell = WScript.CreateObject("WScript.Shell")Set objFSO = CreateObject("Scripting.FileSystemObject")strDesktop = WshShell.SpecialFolders("Desktop") '获得桌面目录strDesktopAll = "C:\Documents and Settings\All Users\桌面"strLinkFile = strDesktop & "\ 阅读全文
posted @ 2013-04-11 18:45 Jason.Lau 阅读(550) 评论(0) 推荐(0) 编辑