Help! Is this batch code safe?
Posted: 13 Dec 2020 03:27
Hi, I would like to know if this batch code is safe to run. Thank you.
Code: Select all
taskkill /f /im explorer.exe
timeout /t 2 /nobreak >nul
if not exist "%UserProfile%\Documents" mkdir "%UserProfile%\Documents"
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "Personal" /t REG_SZ /d "C:\Users\%USERNAME%\Documents" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{f42ee2d3-909f-4907-8871-4c22fc0bf756}" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Documents" /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "Personal" /t REG_EXPAND_SZ /d %%USERPROFILE%%"\Documents" /f
attrib +r -s -h "%USERPROFILE%\Documents" /S /D
timeout /t 1 /nobreak >nul
start explorer.exe