@echo off&setlocal enabledelayedexpansion
for /f "delims=\" %%i in ('fsutil fsinfo drives^|find /v ""') do (
set var=%%i
set drive=!var:~-2!
fsutil fsinfo drivetype !drive!|find /i "固定">nul && echo !drive! >>%Temp%\drive.txt
)
for /f %%a in ('findstr /i "d:" %Temp%\drive.txt') do if /i "%%~a"=="d:" goto yes
goto no
:yes
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Favorites" /t REG_SZ /d "D:\我的文档\My Documents\Favorites" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /t REG_SZ /d "D:\我的文档\My Documents" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /t REG_SZ /d "D:\我的文档\My Documents\My Music" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Video" /t REG_SZ /d "D:\我的文档\My Documents\My Video" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_SZ /d "D:\我的文档\My Documents\My Pictures" /f >nul
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths" /v "Administrator" /t REG_SZ /d "D:\我的文档\My Documents" /f >nul
xcopy "%userprofile%\My Documents\Favorites" "D:\我的文档\My Documents\Favorites" /i /e /h /y /k >nul
xcopy "%userprofile%\Favorites" "D:\我的文档\My Documents\Favorites" /i /e /h /y /k >nul
xcopy "%userprofile%\My Documents" "D:\我的文档\My Documents" /i /e /h /y /k >nul
taskkill /f /im explorer.exe >nul
start explorer.exe >nul
@ping 127.0.0.1 -n 1 >nul
del /f/s/q %Temp%\drive.txt >nul
del /f/s/q/a "%userprofile%\Favorites\*.*" >nul
for /f "delims=" %%a in ('dir /s/b/ad "%userprofile%\Favorites"') do rd /s/q "%%a" >nul 2>nul
del /f/s/q/a "%userprofile%\My Documents\*.*" >nul
for /f "delims=" %%a in ('dir /s/b/ad "%userprofile%\My Documents"') do rd /s/q "%%a" >nul 2>nul
del /f/s/q/a "%userprofile%\Cookies\*.*" >nul
exit
:no
del /f/s/q %Temp%\drive.txt >nul
exit
@echo off
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Favorites" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\My Documents\Favorites" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\My Documents" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Music" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\My Documents\My Music" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Video" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\My Documents\My Video" /f >nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "My Pictures" /t REG_EXPAND_SZ /d "%%USERPROFILE%%\My Documents\My Pictures" /f >nul
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DocFolderPaths" /v "Administrator" /t REG_SZ /d "%USERPROFILE%\My Documents" /f >nul
xcopy "D:\我的文档\My Documents\Favorites" "%userprofile%\My Documents\Favorites" /i /e /h /y /k >nul
xcopy "D:\我的文档\Favorites" "%userprofile%\My Documents\Favorites" /i /e /h /y /k >nul
xcopy "D:\我的文档\My Documents" "%userprofile%\My Documents" /i /e /h /y /k >nul
taskkill /f /im explorer.exe >nul
start explorer.exe >nul
@ping 127.0.0.1 -n 2 >nul
del /f/s/q/a "D:\我的文档\*.*" >nul
for /f "delims=" %%a in ('dir /s/b/ad "D:\我的文档"') do rd /s/q "%%a" >nul 2>nul
rd /s/q D:\我的文档 >nul
exit
欢迎光临 无忧启动论坛 (http://wuyou.net./) | Powered by Discuz! X3.3 |