Cách sao lưu và khôi phục cài đặt chế độ xem thư mục trong Windows 10

Trong Windows, bạn có thể thay đổi chế độ xem template, chiều rộng cột, nhóm theo (Group by), sắp xếp theo (Sort by) và bố cục của nội dung thư mục theo cách bạn muốn.

Hướng dẫn này sẽ chỉ cho bạn cách sao lưu và khôi phục cài đặt chế độ xem thư mục, chi tiết, chiều rộng và kích thước bảng điều khiển preview, chiều rộng cửa sổ điều hướng, hộp thoại Open Save as cho bất kỳ tài khoản nào trong Windows 10.

Cách sao lưu và khôi phục cài đặt chế độ xem thư mục trong Windows 10

Đây là cách thực hiện:

1. Tải xuống file Backup_and_Restore_Folder_View_Settings_Tool.bat.

Lưu ý:

File .bat này sẽ chỉ áp dụng một bản sao lưu và khôi phục cho tài khoản hiện tại.

Dưới đây là nội dung của file .bat này để tham khảo:

Code:

@ECHO OFF

Set "+=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
For /F "tokens=* " %%# in ('Reg Query "%+%" /V Desktop') Do (Set "#=%%#")
Set "#=%#:*REG_EXPAND_SZ    =%"
For /F "delims=" %%# in ('Echo "%#%"') Do (Set "#=%%#")
Set "[Desktop]=%#:~1,-1%"


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.
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 "%[Desktop]%\Folder View Settings Backup" goto :response1
goto :backup

:response1
echo.
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 "%[Desktop]%\Folder View Settings Backup"
REG EXPORT "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults" "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_CurrentVersion_Explorer_Streams_Defaults.reg" /y
REG EXPORT "HKCU\Software\Microsoft\Windows\Shell\BagMRU" "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_BagMRU.reg" /y
REG EXPORT "HKCU\Software\Microsoft\Windows\Shell\Bags" "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_Bags.reg" /y
REG EXPORT "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags" "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_Bags.reg" /y
REG EXPORT "HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU" "%[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" "%[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" "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_Bags.reg" /y
REG EXPORT "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer" "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_Modules_GlobalSettings_Sizer.reg" /y
REG EXPORT "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\NavPane" "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_Modules_NavPane.reg" /y
REG EXPORT "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDOpen" "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_CIDOpen.reg" /y 
REG EXPORT "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDSave" "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_CIDSave.reg" /y
REG EXPORT "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32" "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_ComDlg32.reg" /y
cls
echo.
echo Backup of folder view settings successfully completed.
echo.
pause 
exit

:verify2
IF NOT EXIST "%[Desktop]%\Folder View Settings Backup" goto :response
goto :restore

:response
echo.
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 Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\GlobalSettings\Sizer" /F
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Modules\NavPane" /F
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDOpen" /F
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CIDSave" /F
Reg Delete "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32" /F

REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_CurrentVersion_Explorer_Streams_Defaults.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_BagMRU.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_Shell_Bags.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_Bags.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Microsoft_Windows_ShellNoRoam_BagMRU.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_BagMRU.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_Software_Classes_LocalSettings_Software_Microsoft_Windows_Shell_Bags.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_Modules_GlobalSettings_Sizer.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_Modules_NavPane.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_CIDOpen.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_CIDSave.reg"
REG IMPORT "%[Desktop]%\Folder View Settings Backup\HKCU_SOFTWARE_Microsoft_Windows_CurrentVersion_Explorer_ComDlg32.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.
echo.
pause
taskkill /f /im explorer.exe
start explorer.exe 
exit

2. Lưu file .bat vào desktop.

3. Bỏ chặn file .bat.

4. Chạy file .bat.

5. Làm những gì bạn muốn làm trong Backup and Restore Folder View Settings Tool.

SAO LƯU:

Khi bạn tạo bản sao lưu cài đặt chế độ xem thư mục của mình, thư mục Folder View Settings Backup sẽ được lưu vào desktop chứa các file .reg đã xuất từ registry cho cài đặt chế độ xem thư mục của bạn. Bạn có thể lưu thư mục này vào nơi bạn muốn để giữ an toàn.

KHÔI PHỤC:

Khi bạn muốn khôi phục bản sao lưu cài đặt chế độ xem thư mục của mình, trước tiên bạn cần có thư mục Folder View Settings Backup với tên chính xác này trên desktop để tiến hành quá trình khôi phục.

Sao lưu và khôi phục cài đặt chế độ xem thư mục trong Windows 10
Sao lưu và khôi phục cài đặt chế độ xem thư mục trong Windows 10

Chúc bạn thực hiện thành công!

Thứ Bảy, 03/07/2021 08:11
523 👨 373
0 Bình luận
Sắp xếp theo
    ❖ Windows 10