|
本帖最后由 窄口牛 于 2024-11-21 20:43 编辑
@echo off
Setlocal enabledelayedexpansion
reg query HKU\S-1-5-20>nul || echo;CreateObject^("Shell.Application"^).ShellExecute "%~f0", "", "", "runas", 1 > "%temp%\getadmin.vbs" && cscript //b "%temp%\getadmin.vbs" && exit /b & del "%temp%\getadmin.vbs" /f /q>nul 2>nul
pushd "%CD%"&& CD /D "%~dp0"
reg add "HKCR\Directory\Background\shell\resetexplorer" /v "MUIVerb" /d "重置桌面" /f
reg add "HKCR\Directory\Background\shell\resetexplorer" /v "Position" /d "Bottom" /f
reg add "HKCR\Directory\Background\shell\resetexplorer" /v "SeparatorAfter" /d "" /f
reg add "HKCR\Directory\Background\shell\resetexplorer" /v "SubCommands" /d "" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell\1" /ve /d "重启桌面" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell\1\command" /ve /d "wscript %systemroot%\resetexplorer.vbs" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell\2" /ve /d "关闭重复文件夹" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell\2\command" /ve /d "wscript %systemroot%\resetexplorer.vbs --CloseDuplicate" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell\3" /ve /d "关闭所有文件夹" /f
reg add "HKCR\Directory\Background\shell\resetexplorer\shell\3\command" /ve /d "wscript %systemroot%\resetexplorer.vbs --CloseAll" /f
echo On Error Resume Next>>resetexplorer.vbs
echo Dim ArrayPathFonders(), ShellFonders, WindowOfShellFonders, ShellExplorer>>resetexplorer.vbs
echo Set DictionaryFonders = CreateObject("Scripting.Dictionary")>>resetexplorer.vbs
echo Set ShellFonders = CreateObject("Shell.Application")>>resetexplorer.vbs
echo Set WindowOfShellFonders=ShellFonders.Windows()>>resetexplorer.vbs
echo Set ShellExplorer = CreateObject("WScript.Shell")>>resetexplorer.vbs
echo DictionaryFonders.Add "::{679F85CB-0220-4080-B29B-5540CC05AAB6}",True>>resetexplorer.vbs
echo DictionaryFonders.Add "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}",True>>resetexplorer.vbs
echo DictionaryFonders.Add ShellExplorer.SpecialFolders("Desktop"),True>>resetexplorer.vbs
echo DictionaryFonders.Add ShellExplorer.SpecialFolders("AllUsersDesktop"),True>>resetexplorer.vbs
echo select case WScript.Arguments.count>>resetexplorer.vbs
echo case ^0>>resetexplorer.vbs
echo call RestartExplorer()>>resetexplorer.vbs
echo case ^1>>resetexplorer.vbs
echo call WithArguments()>>resetexplorer.vbs
echo end select>>resetexplorer.vbs
echo sub WithArguments()>>resetexplorer.vbs
echo select case WScript.Arguments(0)>>resetexplorer.vbs
echo case "--CloseAll">>resetexplorer.vbs
echo call CloseAllFolders()>>resetexplorer.vbs
echo case "--CloseDuplicate">>resetexplorer.vbs
echo call CloseDuplicateF |
评分
-
查看全部评分
|