Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @REM newbuild-fix.cmd -- fixes for new Insider builds
- @set TRACE=on
- @REM @set DEBUG=on
- @echo %DEBUG% %TRACE% off
- @setlocal enableextensions
- @set PROMPT=$g
- goto :BEGIN
- This is for user account clean-up after new Insider Build installs.
- Note: this uses a backup for %USERPROFILE% under E:\archive.
- :BEGIN
- set d=%APPDATA%\Microsoft\Windows\Start Menu\Programs
- @REM here be the cruft I want to hide
- @REM --------------------------------
- pushd "%d%"
- attrib +h "Maintenance" /D
- attrib +h "Accessibility" /D
- attrib +h "Administrative Tools" /D
- @REM don't hide the following, delete them
- del "System Tools\Control Panel.lnk"
- del "System Tools\Run.lnk"
- del "System Tools\Settings.lnk"
- del "System Tools\computer.lnk"
- del "System Tools\Administrative Tools.lnk"
- if exist "OneDrive.lnk" (
- if exist "System Tools\OneDrive.lnk" (
- del "OneDrive.lnk"
- ) else (
- move "OneDrive.lnk" "System Tools"
- )
- )
- @REM unfubar Accessories in Start Menu
- set d=%d%\Accessories
- set s=%d:C:\Users=E:\archive\win10%
- pushd "%s%"
- for %%f in (*.lnk) do if not exist "%d%\%%~nxf" copy "%%~f" "%d%"
- popd
- popd
- copy "%d:C:\users=E:\archive\win10%\System Tools\Command Prompt.lnk" "%d%\System Tools"
- @REM get rid of unwanted Sent To entries
- set d=%APPDATA%\Microsoft\Windows\SendTo
- set s=E:\archive\win10\%d:*\Users\=%
- pushd "%d%"
- for %%f in (*) do @if not exist "%s%\%%~nxf" del "%%~f"
- popd
- "%LOCALAPPDATA%\Microsoft\Windows\Themes\my.theme"
- ping 127.0.0.1 -n 5 > nul
- taskkill /F /IM systemsettings.exe
- @REM following needed to prune [Win]+X menu
- @REM --------------------------------------
- set d=%LOCALAPPDATA%\Microsoft\Windows\WinX
- set s=%USERDIR%\archive\win10\%d:*\Users\=%
- for /R "%d%" %%f in (*.lnk) do @call :PROCWINX "%%~f"
- goto :CONTINUE
- :PROCWINX
- set f=%~1
- set f=%f:*\WinX\=%
- if NOT EXIST "%s%\%f%" del "%d%\%f%"
- goto :EOF
- :CONTINUE
- taskkill /F /IM explorer.exe & start explorer
- if "%DEBUG%" == "on" ( pause ) else ( if "%TRACE%" == "on" pause )
- @endlocal
- @set TRACE=
- if "%RECONFIG_RESTART%" == "on" logoff
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement