在C:\sss 文件夹中创建名为 k.bat 的文件,文件内容如下:
@echo off
set "r=C:\sss\k.bat"
set "name=py"
set m="%USERPROFILE%\Desktop\%name%.url"
echo [InternetShortcut] >>%m%
echo URL="%r" >>%m%
echo IconIndex=0 >>%m%
echo IconFile=%name% >>%m%
// win7系统下测试成功通过,同时360会进行拦截,解除阻止即可。
@echo off
echo set WshShell = CreateObject("wscript.Shell"):Set Lnk = WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") ^& "\py.lnk"):Lnk.TarGetPath = ("C:\sss\py.exe"):Lnk.Save >>CreateLnk.vbs && Cscript.exe CreateLnk.Vbs & del CreateLnk.Vbs