源码:

@echo off
title 快捷方式小箭头
mode con cols=36 lines=20

>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )

:menu
cls
echo.
echo          操作快捷方式小箭头
echo              —— Powered By oduang
echo ====================================
echo.
echo  1.去除小箭头
echo.
echo  2.恢复小箭头
echo.
echo  3.退出
echo.
echo ====================================
echo.
echo.

set /p user_input= 请输入数字:
if %user_input% equ 1 goto qc
if %user_input% equ 2 goto hf
if %user_input% equ 3 goto ex

:qc
@echo
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\imageres.dll,197" /t reg_sz /f
taskkill /f /im explorer.exe
attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"
del "%userprofile%\AppData\Local\iconcache.db" /f /q
start explorer
pause
goto ex

:hf
@echo
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /f
taskkill /f /im explorer.exe
attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db"
del "%userprofile%\AppData\Local\iconcache.db" /f /q
start explorer
pause
goto ex

:ex

脚本下载:

最后修改:2020 年 07 月 23 日
如果觉得我的文章对你有用,请随意赞赏