File Explorer ใน Windows ปรับแต่งมุมมองโฟลเดอร์ได้ (Icons, List, Details, Thumbnails) หากต้องการสำรองการตั้งค่าเหล่านี้ไว้ก่อน รีเซ็ตระบบ หรือโอนไปเครื่องอื่น สามารถทำได้ด้วย Batch File (.bat) ที่ Export/Import Registry Keys ที่เกี่ยวข้อง
Backup และ Restore Folder View Settings
- สร้างไฟล์ .bat สำหรับ Backup/Restore
- Unblock ไฟล์ .bat (ถ้าถูกบล็อก)
- รันไฟล์ .bat เลือกเมนู Backup หรือ Restore
1. สร้าง Batch File
- เปิด Notepad คัดลอกโค้ดด้านล่างวางลงไป
- กด Ctrl+S บันทึกบน Desktop ชื่อ
FolderViewBackup.bat(ต้องลงท้าย .bat)
@ECHO OFF title Backup and Restore Folder View Settings Tool :choice cls echo. echo OPTIONS: echo. echo 1. Back up your folder view settings. echo 2. Restore folder view settings from backup. echo 3. Cancel echo. set /P c=Type the option number you would like to do, and press Enter? if /I "%c%" EQU "1" goto :verify1 if /I "%c%" EQU "2" goto :verify2 if /I "%c%" EQU "3" exit goto :choice :verify1 IF EXIST "%userprofile%\Desktop\Folder View Settings Backup" goto :response1 goto :backup :response1 echo. echo You already have a "Folder View Settings Backup" folder on your desktop. echo Please move it to another location, and try again. echo. pause goto :choice :backup mkdir "%userprofile%\Desktop\Folder View Settings Backup" REG EXPORT HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_CurrentVersion_Explorer_Streams_Defaults.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\Shell\BagMRU "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_BagMRU.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\Shell\Bags "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_Bags.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_Bags.reg" /y REG EXPORT HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_BagMRU.reg" /y REG EXPORT "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_BagMRU.reg" /y REG EXPORT "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_Bags.reg" /y cls echo. echo Backup of folder view settings successfully completed. echo. pause exit :verify2 IF NOT EXIST "%userprofile%\Desktop\Folder View Settings Backup" goto :response goto :restore :response echo. echo You do not have a "Folder View Settings Backup" folder on your desktop. echo Please place the backup folder on your desktop, and try again. echo. pause goto :choice :restore REG Delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" /F Reg Delete "HKCU\Software\Microsoft\Windows\Shell\BagMRU" /F Reg Delete "HKCU\Software\Microsoft\Windows\Shell\Bags" /F Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags" /F Reg Delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU" /F REG Delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /F REG Delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /F REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_CurrentVersion_Explorer_Streams_Defaults.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_BagMRU.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_Bags.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_Bags.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_BagMRU.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_BagMRU.reg" REG IMPORT "%userprofile%\Desktop\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_Bags.reg" cls echo. echo Backup of folder view settings successfully restored. echo. echo Waiting to restart explorer to apply. echo Your screen will flash as explorer is restarted. echo. pause taskkill /f /im explorer.exe start explorer.exe exit
2. Unblock ไฟล์ .bat
คลิกขวาไฟล์ .bat > Properties > แท็บ General > ติ๊ก Unblock > OK (หากไม่มี Checkbox แสดงว่าไม่ถูกบล็อก)
3. รันไฟล์ .bat
ดับเบิลคลิกไฟล์ .bat จะเปิด CMD แสดงเมนู:
- กด 1 Enter = Backup
- กด 2 Enter = Restore
- กด 3 Enter = Cancel
Restore จะ Restart Explorer อัตโนมัติ (หน้าจอกระพริบสั้นๆ)