![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-07 22:32 |
共 48,041 主题排行 / 350,128 发帖 / 今日 3 篇 / 48,252 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » 创建刷新排列桌面图标工具 |
| 可打印版本 786 / 0 |
| 第1楼 tvzml | 发表于 2008-03-31 16:25 |
| 初级用户 发帖 67 积分 157 | |
|
创建刷新排列桌面图标工具 工作原理:
1 每次修改配种文件ShortCut.ini里的Modified=0为Modified=1,这样达到每次强行覆盖目的。 2 通过转换日期为 2008XXXX,删除ShortCut.exe产生的LOG文件和目录。 3 利用VBS检测当前工作目录是否为桌面,结果为非执行CleanDesktop.SCF切换到桌面。 4 利用VBS的SendKeys模拟一次F5刷新,再模拟鼠标右键I到 T按类型排列,完成桌面图标整理。 Shortcut.bat 内容 @echo off & SetLocal EnableDelayedExpansion set ShortCut=.\ShortCut\ShortCut.ini for /f "tokens=2,1" %%a in (%ShortCut%) do ( set /a flag+=1 if !flag! equ 3 (>>n echo Modified=1) else (>>n echo %%a %%b) ) move /y "n" "%ShortCut%" 2>NUL Shortcut.exe set n=%date:~0,4% set y=%date:~5,2% set r=%date:~8,2% set logname=%n%%y%%r% echo shortcut%logname%.log echo shortcut20080331.log del /q ".\Log\shortcut%logname%.log" if not exist ".\Log\*.log" rd /q ".\Log" Shortcut.vbs Shortcut.vbs 内容 On Error Resume Next Set WshSHell = WScript.CreateObject("WScript.Shell") if (WshShell.CurrentDirectory = WshShell.SpecialFolders("Desktop")) = "False" then WshSHell.Run("CleanDesktop.SCF") end if WScript.Sleep 500 WshSHell.SendKeys "{F5}+{F10}e" WshSHell.SendKeys "+{F10}IT" Set WshSHell = Nothing Set FSO = Nothing WScript.Quit CleanDesktop.scf 内容 Command=2 IconFile=explorer.exe,3 Command=ToggleDesktop ShortCut.ini 内容 CRC=-1901140355 Modified=0 QQ=10130.ico;"E:\NBMSClient\BarClientView.exe" -Package 个人磁盘=个人磁盘.ico;"E:\NBMSClient\BarClientView.exe" -UDisk 网络游戏=网络游戏.ico;"E:\nbmsclient\BarClientView.exe" -Class #桌面图标名称=图标文件名称;"执行文件路径" -参数 下载地址 http://upload.cn-dos.net/img/179.rar |
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |