Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal
- set PROFILEDIR=D:\Users
- call :mklink "C:\Documents and Settings" "%PROFILEDIR%"
- call :mklink "C:\Users" "%PROFILEDIR%"
- call :mklink "C:\ProgramData\Desktop" "%PROFILEDIR%\Public\Desktop"
- call :mklink "C:\ProgramData\Documents" "%PROFILEDIR%\Public\Documents"
- call :mklink "C:\ProgramData\Favorites" "%PROFILEDIR%\Public\Favorites"
- endlocal
- goto :EOF
- :mklink
- setlocal
- if exist %1 rd %1
- if "%3"=="1" (
- mklink /d %1 %2
- ) else (
- mklink /j %1 %2
- )
- echo y| cacls %1 /l /s:"D:PAI(D;;CC;;;WD)(A;;0x1200a9;;;WD)(A;;FA;;;SY)(A;;FA;;;BA)" > nul
- attrib -r -a +s +h %1 /l
- icacls %1 /q /l /setowner "NT AUTHORITY\SYSTEM"
- endlocal
- goto :EOF
Add Comment
Please, Sign In to add comment