win11删除/恢复桌面快捷方式小箭头

新建文本文档,复制以下代码,改名为.bat后以管理员身份运行。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
:: # 声明代码页编码格式为 UTF-8
chcp 65001
@echo off
mode con lines=5 cols=50
color a
cls

goto choose

:add
reg add HKLM\SOFTWARE\Classes\lnkfile /t REG_SZ /v IsShortcut /f >nul
reg add HKLM\SOFTWARE\Classes\piffile /t REG_SZ /v IsShortcut /f >nul
goto refresh

:del
reg delete HKLM\SOFTWARE\Classes\lnkfile /v IsShortcut /f >nul
reg delete HKLM\SOFTWARE\Classes\piffile /v IsShortcut /f >nul
goto refresh

:refresh
taskkill /im explorer.exe /f >nul 2>nul
attrib -s -r -h "%userprofile%\AppData\Local\iconcache.db" >nul 2>nul
del "%userprofile%\AppData\Local\iconcache.db" /f /q >nul 2>nul
start explorer >nul 2>nul & goto :eof

:choose
cls
echo.&echo.
echo 1,去掉小箭头 2,恢复小箭头
echo.
choice /c 12 /n

if ERRORLEVEL 2 goto add
if ERRORLEVEL 1 goto del

来源:https://blog.csdn.net/guzhizang/article/details/135246029?fromshare=blogdetail&sharetype=blogdetail&sharerId=135246029&sharerefer=PC&sharesource=ks9900&sharefrom=from_link

  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!

扫一扫,分享到微信

微信分享二维码
  • Copyrights © 2024-2025 xgclevo
  • 访问人数: | 浏览次数:

请我喝杯咖啡吧~

支付宝
微信