如何只用批处理创建快捷方式

来源:百度知道 编辑:UC知道 时间:2024/05/16 09:13:54
如何!只!用批处理创建快捷方式!!!!求救啊!!!!
急急 急,详细教程!!!!外加个例子!!!
如有软件就更好!
谢谢了!加20分

@echo off
echo [InternetShortcut] >"%userprofile%\桌面\Notepad.url"
echo URL=c:\windows\system32\notepad.exe >>"%userprofile%\桌面\Notepad.url"
echo IconIndex=20 >>"%userprofile%\桌面\Notepad.url"
echo IconFile=C:\windows\system32\shell32.dll >>"%userprofile%\桌面\Notepad.url"
exit

将文件名和路径改成实际的即可。

c:\windows\system32\notepad.exe 为要创建快捷方式的程序
IconIndex 是系统默认图标{可以更改}
%userprofile%\桌面\Notepad.url 生成的快捷方式{桌面}

@echo off
echo Dim WshShell,Shortcut>%temp%\a.vbs
echo Dim path,fso>>%temp%\a.vbs
echo path="快捷方式的目标">>%temp%\a.vbs
echo Set fso=CreateObject^("Scripting.FileSystemObject"^)>>%temp%\a.vbs
echo Set WshShell=WScript.CreateObject^("WScript.Shell"^)>>%temp%\a.vbs
echo Set Shortcut=WshSh