Windows系统下自动排列桌面图标

gong'zhong'h!

在网吧或者公司等电脑多的地方,桌面图标不规则排序,非常影响美观,所以有时候就需要这个。

Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set OF = FSO.OpenTextFile(FSO.BuildPath(FSO.GetSpecialFolder(1),"ShowDisktop.SCF"),2,True)
OF.Write("[Shell]"&vbcrlf&"Command=2"&vbcrlf&"IconFile=explorer.exe,3"&vbcrlf&"[Taskbar]"&vbcrlf&"command=ToggleDesktop")
OF.Close
if (WshShell.CurrentDirectory = WshShell.SpecialFolders("Desktop")) = "False" then
WshSHell.Run("ShowDisktop.SCF")
end if
WScript.Sleep 500
WshSHell.SendKeys "{F5}+{F10}e"
WshSHell.SendKeys "+{F10}IA"
Set WshSHell = Nothing
Set FSO = Nothing
WScript.Quit

把上面代码存为 自动排列桌面图标.vbs 文件运行即可。

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注

10 + 8 =