インストール後に実行するバッチファイル
どっかで投稿したと思うけど忘れたのでとりあえず。
注 : 私の環境下での場合です。パスなどは自身の環境に置き換えてください。
@echo off
REG IMPORT "G:\Tools\7-Zip\7Z.reg"
REG IMPORT "G:\Tools\Hidemaru64\Setting\HideEnv.reg"
REG IMPORT "I:\UPdate\HP ProBook 450 G9\SetupComplete_450G9.reg"
copy "F:\vivaldi\Application\vivaldi.lnk" "%USERPROFILE%\Desktop" /y
copy "G:\Tools\Restorator 2018\Restorator 2018.lnk" "%USERPROFILE%\Desktop" /y
copy "J:\WindowsBackup\Tools\HexWorkshop.lnk" "%APPDATA%\Microsoft\Windows\SendTo" /y
copy "G:\Tools\WinCRC\WinCRC.lnk" "%APPDATA%\Microsoft\Windows\SendTo" /y
xcopy "J:\WindowsBackup\Tools" "%APPDATA%\Microsoft\Windows\Start Menu\Tools" /i /e /q /y
rd %TEMP% /q /s > nul 2>&1
del /q /s /f "%SystemRoot%\Temp\*" && for /d %x in ("%SystemRoot%\Temp\*") do @rd /s /q "%x"
del /q /s /f "%LOCALAPPDATA%\Temp\*" && for /d %x in ("%LOCALAPPDATA%\Temp\*") do @rd /s /q "%x"
Reg.exe add "HKCR\Folder\shell\opennewprocess" /v "icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,-185" /f
Reg.exe add "HKCR\Folder\shell\opennewtab" /v "icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,-16819" /f
Reg.exe add "HKCR\Folder\shell\opennewwindow" /v "icon" /t REG_SZ /d "C:\Windows\System32\imageres.dll,-116" /f
- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -
実際にはもっとあるのだけど、コピーや掃除、エントリの追加などの操作の一部のみ記載してます。
レジストリエントリのインポートについては、SetupComplete_450G9.reg にまとめてもいいんだけど個別に修正する場合のことを考えて敢えて分けてます。
SetupComplete_450G9.reg は、デスクトップPCや他のノートでドライブレターが変わった場合のことを考えてPCごとに名前を変えて個別に保存してます。
* サンプル
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\.bmp\ShellNew]
[-HKEY_CLASSES_ROOT\.contact\ShellNew]
[-HKEY_CLASSES_ROOT\.jnt\jntfile\ShellNew]
[-HKEY_CLASSES_ROOT\.rar\ShellNew]
[-HKEY_CLASSES_ROOT\.rtf\ShellNew]
[-HKEY_CLASSES_ROOT\.txt\ShellNew]
[-HKEY_CLASSES_ROOT\.zip\CompressedFolder\ShellNew]
[-HKEY_CLASSES_ROOT\.zip\ShellNew]
[-HKEY_CLASSES_ROOT\.ec4\ShellNew]
[-HKEY_CLASSES_ROOT\.xlsx\Excel.Sheet.12\ShellNew]
[HKEY_CURRENT_USER\Environment]
"TEMP"="E:\\Temp"
"TMP"="E:\\Temp"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]
"TEMP"="E:\\Temp"
"TMP"="E:\\Temp"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\comdlg32\PlacesBar]
"Place0"="MyDocuments"
"Place1"="G:\\"
"Place2"="H:\\"
"Place3"="I:\\"
"Place4"="J:\\"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"My Music"="G:\\My Documents\\My Music"
"My Pictures"="G:\\My Documents\\My Pictures"
"My Video"="G:\\My Documents\\My Video"
"Personal"="G:\\My Documents"
"{374DE290-123F-4565-9164-39C4925E467B}"="J:\\Downloads"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"My Music"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,00,\
6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,00,20,00,4d,00,75,00,73,00,69,\
00,63,00,00,00
"My Pictures"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,\
00,6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,00,20,00,50,00,69,00,63,00,\
74,00,75,00,72,00,65,00,73,00,00,00
"My Video"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,00,\
6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,00,20,00,56,00,69,00,64,00,65,\
00,6f,00,00,00
"Personal"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,20,00,44,00,6f,00,63,00,75,00,\
6d,00,65,00,6e,00,74,00,73,00,00,00
"{374DE290-123F-4565-9164-39C4925E467B}"=hex(2):4a,00,3a,00,5c,00,44,00,6f,00,\
77,00,6e,00,6c,00,6f,00,61,00,64,00,73,00,00,00
"{7D83EE9B-2244-4E70-B1F5-5393042AF1E4}"=hex(2):4a,00,3a,00,5c,00,44,00,6f,00,\
77,00,6e,00,6c,00,6f,00,61,00,64,00,73,00,00,00
"{F42EE2D3-909F-4907-8871-4C22FC0BF756}"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,\
20,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,00,00
"{0DDD015D-B06C-45D5-8C4C-F59713854639}"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,\
20,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,\
00,20,00,50,00,69,00,63,00,74,00,75,00,72,00,65,00,73,00,00,00
"{35286A68-3C57-41A1-BBB1-0EAE73D76C95}"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,\
20,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,\
00,20,00,56,00,69,00,64,00,65,00,6f,00,00,00
"{A0C69A99-21C8-4671-8703-7934162FCF1D}"=hex(2):47,00,3a,00,5c,00,4d,00,79,00,\
20,00,44,00,6f,00,63,00,75,00,6d,00,65,00,6e,00,74,00,73,00,5c,00,4d,00,79,\
00,20,00,4d,00,75,00,73,00,69,00,63,00,00,00