| 实例一(使用.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 FunctionMakeDesktopShortcut “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-2-25 |
文章目录
- apache (3)
- CSS (3)
- html (4)
- javascript应用 (2)
- Linux 技术 (49)
- mysql (9)
- nginx (2)
- PHP (29)
- SEO (25)
- webmin (1)
- Windows 实战 (30)
- wordpress (30)
- zen-cart (43)
- 健康 (4)
- 其他转载 (34)
- 十万个为什么 (2)
- 外贸收款 (2)
- 学习 (16)
- 学习-转载 (13)
- 情感社区 (6)
- 手机 (2)
- 数据库 (1)
- 文学 (1)
- 文摘 (1)
- 未分类 (48)
- 热点新闻 (10)
- 生活常识 (7)
- 组网 (4)
- 英语学习 (3)
- 计算机技术学习 (4)
- 说文解字 (1)
- 转载 (29)
- 轻松一下 (32)
- 邹清水 (110)
真是不错啊,嘿嘿嘿
哈哈,天天更新
很好的博客,有很多知识可以学到。。。我定会常来逛逛。哈哈,记得更新啊。。。