@echo off

echo 1.去掉Win7快捷方式小箭头
echo 2.恢复Win7快捷方式小箭头
echo.
echo 3.去掉 XP 快捷方式小箭头
echo 4.恢复 XP 快捷方式小箭头
echo.
echo 0.退出
echo ---------------------------

:select
set /P select=请选择:
if "%select%" == "0" goto end2
if not "%select%" == "1" ( if not "%select%" == "2" ( if not "%select%" == "3" ( if not "%select%" == "4" ( goto end1 ) ) ) )

ver | find "6.1" > NUL
if "%errorlevel%" == "0" (
    if "%select%" == "1" (
        reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\imageres.dll,196" /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
    ) 

    if "%select%" == "2" (
        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
    )
)

ver | find "5.1" > NUL
if "%errorlevel%" == "0" (
    if "%select%" == "3" (
        reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /d "%systemroot%\system32\shell32.dll,49" /t reg_sz /f
        taskkill /f /im explorer.exe
        attrib -s -r -h "%userprofile%\Local Settings\Application Data\iconcache.db"
        del "%userprofile%\Local Settings\Application Data\iconcache.db" /f /q
        start explorer
    )

    if "%select%" == "4" (
        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%\Local Settings\Application Data\iconcache.db"
        del "%userprofile%\Local Settings\Application Data\iconcache.db" /f /q
        start explorer
    )
)
goto end2

::--------------------------------
:end1
echo 您的选择无效。
echo.
goto select

:end2
pause

 

 


本文链接地址: 去掉/恢复Win7/XP快捷方式小箭头
http://qingfengju.com/index.asp?id=361

分类:脚本编程 查看次数:3467 发布时间:2013-11-1 21:32:20