文章·资料 电脑软件 手机应用 网站源码




    本 站 搜 索
   推 荐 文 章        More...
华硕易电脑(ASUS Eee PC 1025C..
先来段开场白:为了外出携带方便,到淘..
Acronis True Image 使用说明
  一款可以在Windows下使用全部功..
Norton Ghost 使用详解
一、分区备份   使用Ghost进行系..
    文 章 阅 读 排 行
手机视频监控 APP 关闭广告:萤..
一、萤石云视频:我的,设置,隐私设置,..
常见数据库介绍与对比(SQL Serv..
常见数据库的对比分析,涵盖你提到的 A..
Windows 系统修改默认文件类型..
Windows 系统文件类型图标,通常由默..
Windows 系统安装或备份时 ISO,..
【ISO 文件】 ISO 文件其实就是光..
Microsoft SQL Server 2000 Per..
  对于第一次安装 Microsoft SQL Se..
颜色与英文单词对照
颜色与英文单词对照 red green bl..
PakePlus 构建 APP 需要 Github..
PakePlus 是一个基于 Rust Tauri 的..
主页真的越Google、越简洁越好吗
  如果你在11月10日早上打开雅虎中..
网络工程师必懂的专业术语
路由器问题:1、什么时候使用多路由协..
为啥现在的电脑都不能安装 Wind..
说实话,这几年如果你尝试在新电脑..
 文 章 信 息
用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
〖文章浏览:〗〖发送文章〗〖打印文章