[会员中心]  [发布文章][发布软件]  [中文繁體]
 文章·资料  电脑软件  手机软件  网站源码
    本 站 搜 索
[选项]
   推 荐 文 章        More...
华硕易电脑(ASUS Eee PC 10..
先来段开场白:为了外出携带方便,..
Acronis True Image 使用..
  一款可以在Windows下使用全..
Norton Ghost 使用详解
一、分区备份   使用Ghost进..
    文 章 阅 读 排 行
Microsoft SQL Server 2000..
  对于第一次安装 Microsoft SQ..
ASP:Dimac W3 JMail 发送..
【发送邮件测试代码下载】压..
ASP:Persits ASPMail 发送..
【发送邮件测试代码下载】压..
VMware Workstation:安装..
编写这份虚拟机安装的图文教程,..
华硕易电脑(ASUS Eee PC 10..
先来段开场白:为了外出携带方便,..
ASP:Microsoft CDO 发送邮..
【发送邮件测试代码下载】压..
 文 章 信 息
用CMD命令或VBS创建某个程序的快捷方式
评论()〗〖留言〗〖收藏
〖文章分类:电脑·手机·网络 / 电脑系统安装·设置·优化〗〖阅读选项
实例一(使用.bat 批处理程序)
----------------------------------------------------------
echo [InternetShortcut] >>test.url
echo URL=c:\windows\system32\notepad.exe >>test.url
echo IconIndex=29 >>test.url
echo IconFile=C:\windows\system32\shell32.dll >>test.url


实例二(使用.bat 批处理程序)
----------------------------------------------------------
@echo off
if exist "%test.url" echo 链接 "%test.url" 已创建! & goto :eof
if exist "%~f2" echo 目标 "%~f2" 不存在! & goto :eof
echo [InternetShortcut] > "%test.url"
echo URL=%~f2 >> "%test.url"
echo IconIndex=0 >> "%test.url"
echo IconFile=%~f2 >> "%test.url"


实例三(使用.vbs 程序)
----------------------------------------------------------
Dim WSHShell, fs
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set fs = WScript.CreateObject("Scripting.FileSystemObject")
Function MakeDesktopShortcut( name, target )
Dim Shortcut,DesktopPath,StartupPath
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\" & name & ".lnk")
Shortcut.TargetPath = target
StartupPath = fs.GetParentFolderName( target )
If fs.FolderExists( StartupPath ) then
Shortcut.WorkingDirectory = StartupPath
End If
Shortcut.Save
End Function

MakeDesktopShortcut "Shortcut to Notepad", "C:\Windows\Notepad.exe"


实例四(使用.vbs 程序)
----------------------------------------------------------
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")  '获得桌面目录
set oShellLink = WshShell.CreateShortcut(strDesktop & "\qq.lnk")  '快捷方式存放目录及名称
oShellLink.TargetPath = "C:\Program Files\Tencent\QQ\CoralQQ.exe"  '指向的可执行文件
oShellLink.WindowStyle = 1  '运行方式
oShellLink.Hotkey = "CTRL+SHIFT+F"  '快捷键
oShellLink.IconLocation = "C:\Program Files\Tencent\QQ\QQ.exe, 0"  '图标
oShellLink.Description = "qq"  '备注
oShellLink.WorkingDirectory = "C:\Program Files\Tencent\QQ\"  '起始目录
oShellLink.Save  '创建快捷方式

文章作者:未知  更新日期:2009-02-25
〖文章浏览:〗〖打印文章〗〖发送文章
阅读说明
·本站大部分文章转载于网络,如有侵权请留言告知,本站即做删除处理。
·本站法律法规类文章转载自[中国政府网(www.org.cn)],相关法律法规如有修订,请浏览[中国政府网]网站。
·本站转载的文章,不为其有效性,实效性,安全性,可用性等做保证。
·如果有什么问题,或者意见建议,请联系[网站管理员]。
  当百网
  本站使用【啊估文章软件站】网站系统    网站管理员留言簿