| 
	| 〖文章分类:电脑·手机·网络 / 电脑系统安装·设置·优化〗〖阅读选项〗 |  | 批处理(.BAT)创建快捷方式 -----------------------------------------------------------------
 set path=C:\windows\system32\cmd.exe
 echo [InternetShortcut] >>cmd.url
 echo URL="%path%" >>cmd.url
 echo IconIndex=29 >>cmd.url
 echo IconFile=C:\windows\system32\shell32.dll >>cmd.url
 
 set path=C:\windows\system32\mstsc.exe
 echo [InternetShortcut] >>mstsc.url
 echo URL="%path%" >>mstsc.url
 echo IconIndex=29 >>mstsc.url
 echo IconFile=C:\windows\system32\shell32.dll >>mstsc.url
 del %0%
 
 
 
 VBS 创建快捷方式
 -----------------------------------------------------------------
 cmd = "c:\windows\system32\cmd.exe"
 mstsc = "c:\windows\system32\mstsc.exe"
 Set objShell = CreateObject("Wscript.Shell")
 Set objShellLink = objShell.CreateShortcut("cmd.lnk")
 objShellLink.TargetPath = cmd
 objShellLink.Save
 
 Set objShellLink = objShell.CreateShortcut("mstsc.lnk")
 objShellLink.TargetPath = mstsc
 objShellLink.Save
 Set fso = CreateObject("Scripting.FileSystemObject")
 f = fso.DeleteFile(WScript.ScriptName)
 
 
 变通的方法,这个快捷方式和用右键中的“发送桌面快捷方式”建立的是不一样的。如果想建立那种的话可以考虑用 VBS。
 iconfile:指定了快捷方式使用的图标文件。
 iconindex:指定了快捷方式使用的图标文件中的第几个图标。
 url:指定了快捷方式指向的可执行文件。
 
 |  | 文章作者:未知  更新日期:2006-10-30 |  | 〖文章浏览:〗〖发送文章〗〖打印文章〗 |  |  |  |