打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
BAT 批处理创建桌面快捷方式代码大全
【一】 直接生成:
echo [InternetShortcut]>>"%USERPROFILE%\桌面\BatMPlayer.url"
echo URL="C:\BatMPlayer\BatMPlayer.bat">>"%USERPROFILE%\桌面\BatMPlayer.url"
echo IconIndex=99>>"%USERPROFILE%\桌面\BatMPlayer.url"
echo IconFile=%SystemRoot%\system32\SHELL32.dll>>"%USERPROFILE%\桌面\BatMPlayer.url"
 
【二】 先设置变量生成:
 @echo off
set "path=C:\BatMPlayer\BatMPlayer.bat"
set "name=我的BatMPlayer"
set m="%USERPROFILE%\桌面\%name%.url"
echo [InternetShortcut] >>%m%
echo URL="%path%" >>%m%
echo IconIndex=10 >>%m%
echo IconFile=C:\windows\system32\shell32.dll >>%m%
pause
 
 
【三】 简单生成:
 @echo off
md "%userprofile%\桌面\1"
(echo [.shellclassinfo]
echo iconfile="%%systemroot%%\system32\shell32.dll"
echo iconindex=-50
)>"%userprofile%\桌面\1\desktop.ini"
attrib +S +R "%userprofile%\桌面\1"
pause
 
代码解释:
 [InternetShortcut]         ;快捷方式。
URL="C:\BatMPlayer\BatMPlayer.bat"          ;快捷方式的程序路径。
IconIndex=99         ;快捷方式使用的图标的顺序号(此处为系统文件中的图标的顺序,位于以下的IconFile文件夹中,具体查看第三部分的《Shell32.Dll 图标资源对照表》)。
IconFile=%SystemRoot%\system32\SHELL32.dll         ;快捷方式图标的位置(此处为系统文件路径,常见系统快捷方式的图标存放位置)。
"%USERPROFILE%\桌面\BatMPlayer.url"        ; 快捷方式创建位置(此处为桌面),注意双引号和后缀名
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
命令行创建快捷方式的批处理脚本
使用winrar自解压功能制作安装包
如何创建一个网络快捷方式(.URL)文件
用命令行创建快捷方式
复制文件到c盘windows文件夹下的system32的批处理写法
去掉windows8桌面图标快捷方式小箭头的小技巧
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服