set ICO=D:\圖樣\ico\程式表徵圖
echo %ICO%
::停止並禁用自動播放
sc config ShellHWDetection start= disabled
net stop "Shell Hardware Detection"
::停止並禁用自動更新
net stop wuauserv
sc config wuauserv start= disabled
::不用自動更新
regsvr32 /u wuaueng.dll
::---------------------------------------------------------------------------------------------------------------
::右鍵菜單記事本開啟
reg add "HKEY_CLASSES_ROOT\*\shell\notepad" /ve /t REG_SZ /d "(&2)To Notepad Open" /f
reg add "HKEY_CLASSES_ROOT\*\shell\notepad\command" /ve /t REG_SZ /d "notepad.exe \"%%1\"" /f
reg add "HKEY_CLASSES_ROOT\*\shell\EditPlus" /ve /t REG_SZ /d "(&3)To EditPlus Open" /f
reg add "HKEY_CLASSES_ROOT\*\shell\EditPlus\command" /ve /t REG_SZ /d "D:\Program Files\EditPlus 3\EditPlus.exe \"%%1\"" /f
::右鍵菜單 在這裡進入 cmd
reg add "HKEY_CLASSES_ROOT\Directory\shell\CMD" /ve /t REG_SZ /d "(&1)To Terminal " /f
reg add "HKEY_CLASSES_ROOT\Directory\shell\CMD\command" /ve /t REG_SZ /d "cmd.exe /k cd \"%%L\"" /f
reg add "HKEY_CLASSES_ROOT\*\shell\terminal" /ve /t REG_SZ /d "(&1)To Terminal " /f
reg add "HKEY_CLASSES_ROOT\*\shell\terminal\command" /ve /t REG_SZ /d "cmd.exe echo \"%%L\"" /f
::---------------------------------------------------------------------------------------------------------------
::右鍵菜單新鍵添加
reg add "HKCR\.bat\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.cmd\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.vbs\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.js\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.html\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.c\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.cpp\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.asm\shellnew" /v NullFile /t REG_SZ /f
reg add "HKCR\.java\shellnew" /v NullFile /t REG_SZ /f
::---------------------------------------------------------------------------------------------------------------
::Hfile
reg add "HKCR\.h" /ve /t REG_SZ /d "Hfile" /f
reg add "HKEY_CLASSES_ROOT\Hfile" /ve /t REG_SZ /d "程式頭來源文件" /f
reg add "HKEY_CLASSES_ROOT\Hfile\DefaultIcon" /ve /t REG_SZ /d "%ICO%\Head.ico" /f
reg add "HKEY_CLASSES_ROOT\Hfile\shell\open" /ve /t REG_SZ /d "開啟&O" /f
reg add "HKEY_CLASSES_ROOT\Hfile\shell\open\command" /ve /t REG_SZ /d "%SystemRoot%\System32\NOTEPAD.EXE %%1" /f
::asmfile
reg add "HKCR\.asm" /ve /t REG_SZ /d "asmfile" /f
reg add "HKEY_CLASSES_ROOT\asmfile" /ve /t REG_SZ /d "組譯工具來源文件" /f
reg add "HKEY_CLASSES_ROOT\asmfile\DefaultIcon" /ve /t REG_SZ /d "%ICO%\ASM.ico" /f
reg add "HKEY_CLASSES_ROOT\asmfile\shell\open" /ve /t REG_SZ /d "開啟&O" /f
reg add "HKEY_CLASSES_ROOT\asmfile\shell\open\command" /ve /t REG_SZ /d "%SystemRoot%\System32\NOTEPAD.EXE %%1" /f
::Cppfile
reg add "HKCR\.cpp" /ve /t REG_SZ /d "cppfile" /f
reg add "HKEY_CLASSES_ROOT\Cppfile" /ve /t REG_SZ /d "C++程式來源文件" /f
reg add "HKEY_CLASSES_ROOT\Cppfile\DefaultIcon" /ve /t REG_SZ /d "%ICO%\c++.ico" /f
reg add "HKEY_CLASSES_ROOT\Cppfile\shell\open" /ve /t REG_SZ /d "開啟&O" /f
reg add "HKEY_CLASSES_ROOT\Cppfile\shell\open\command" /ve /t REG_SZ /d "%SystemRoot%\System32\NOTEPAD.EXE %%1" /f
::Cfile
reg add "HKCR\.c" /ve /t REG_SZ /d "cfile" /f
reg add "HKEY_CLASSES_ROOT\Cfile" /ve /t REG_SZ /d "C程式來源文件" /f
reg add "HKEY_CLASSES_ROOT\Cfile\DefaultIcon" /ve /t REG_SZ /d "%ICO%\c.ico" /f
reg add "HKEY_CLASSES_ROOT\Cfile\shell\open" /ve /t REG_SZ /d "開啟&O" /f
reg add "HKEY_CLASSES_ROOT\Cfile\shell\open\command" /ve /t REG_SZ /d "%SystemRoot%\System32\NOTEPAD.EXE %%1" /f
::Javafile
reg add "HKCR\.Java" /ve /t REG_SZ /d "Javafile" /f
reg add "HKEY_CLASSES_ROOT\Javafile" /ve /t REG_SZ /d "Java程式來源文件" /f
reg add "HKEY_CLASSES_ROOT\Javafile\DefaultIcon" /ve /t REG_SZ /d "%ICO%\Java.ico" /f
reg add "HKEY_CLASSES_ROOT\Javafile\shell\open" /ve /t REG_SZ /d "開啟&O" /f
reg add "HKEY_CLASSES_ROOT\Javafile\shell\open\command" /ve /t REG_SZ /d "%SystemRoot%\System32\NOTEPAD.EXE %%1" /f
::---------------------------------------------------------------------------------------------------------------
::顯示系統鎖定的副檔名
reg delete "HKCR\lnkfile" /v NeverShowExt /f
reg delete "HKCR\piffile" /v NeverShowExt /f
reg delete "HKCR\xnkfile" /v NeverShowExt /f
reg delete "HKCR\DocShortcut" /v NeverShowExt /f
reg delete "HKCR\InternetShortcut" /v NeverShowExt /f
reg delete "HKCR\SHCmdFile" /v NeverShowExt /f
reg delete "HKCR\ShellScrap" /v NeverShowExt /f
::顯示隱藏副檔名
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 00000000 /f
::顯示隱藏檔案
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t reg_dword /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t reg_dword /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t reg_dword /d 1 /f
::為各個磁碟設定表徵圖
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultIcon" /ve /t REG_SZ /d "D:\圖樣\ico\1831_aquaneueblue\Aqua Neue\Favorites.ico" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\d\DefaultIcon" /ve /t REG_SZ /d "D:\圖樣\ico\1831_aquaneueblue\Aqua Neue\Internal - Alt.ico" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\e\DefaultIcon" /ve /t REG_SZ /d "D:\圖樣\ico\1831_aquaneueblue\Aqua Neue\Internal - Alt.ico" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\f\DefaultIcon" /ve /t REG_SZ /d "D:\圖樣\ico\1831_aquaneueblue\Aqua Neue\Internal - Alt.ico" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\H\DefaultIcon" /ve /t REG_SZ /d "D:\圖樣\ico\cd_rom_driver.ico" /f
::taskkill /f /im explorer.exe
::start explorer.exe
pause