Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- title Shortcut arrow remover Windows 7
- mode con:cols=80 lines=4
- echo You have to run this as admin or it won't work.
- echo.
- echo.
- pause
- cls
- :: Prompts user to make a choice for removal or restore of the default icon. Automatically quits after 30s if no choice is made.
- CHOICE /C ABC /D C /T 30 /M "A removes the arrow, B puts it back. C exits."
- IF ERRORLEVEL 3 GOTO exit
- IF ERRORLEVEL 2 GOTO add
- IF ERRORLEVEL 1 GOTO remove
- :: Adds a reg key which changes icon used for overlaying onto shortcuts. "49" is a blank icon.
- :remove
- REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /v 29 /t REG_SZ /d "C:\\Windows\\System32\\shell32.dll,49" /f
- goto explorer
- :: Deletes the key created above so the regular arrow icon is used.
- :add
- REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Icons" /va /f
- goto explorer
- :: Restarts explorer so changes have an immediate effect.
- :explorer
- taskkill /f /IM explorer.exe
- start explorer.exe
- goto exit
- :exit
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement