Skip to content

Instantly share code, notes, and snippets.

@y0ug
Created November 10, 2014 14:54
Show Gist options
  • Save y0ug/4d1cf25fc60218b66c7b to your computer and use it in GitHub Desktop.
Save y0ug/4d1cf25fc60218b66c7b to your computer and use it in GitHub Desktop.
REM disable all the shitz
REM set LIST=(helpsvc ERSvc FastUserSwitchingCompatibility RDSessMgr WZCSVC Dot3scv VSS Themes LmHosts srservice SSDPSRV SCardSvr wscsvc Spooler wuauserv CiSvc SwPrv Win32Time)
REM for %%i in %LIST% do CALL sc config %%i start= disabled
set LIST=(HKCU HKLM)
REM classic theme
CALL rundll32.exe %SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\desk.cpl desk,@Themes /Action:OpenTheme /file:"C:\Windows\Resources\Ease of Access Themes\classic.theme"
REM switch classic control panel
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ForceClassicControlPanel /t REG_DWORD /d 1 /f
REM blank start page
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /t REG_SZ /d "about:blank" /f
REM disable screensaver
for %%i in %LIST% do CALL reg ADD "%%i\Software\Policies\Microsoft\Windows\Control Panel\Desktop" /v ScreenSaveActive /t REG_DWORD /d 0 /f
REM old start menu
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoSimpleStartMenu /t REG_DWORD /d 1 /f
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoSMMyDocs /t REG_DWORD /d 1 /f
REM custom explorer
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSuperHidden /t REG_DWORD /d 1 /f
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v StartMenuLogoff /t REG_DWORD /d 1 /f
for %%i in %LIST% do CALL reg ADD "%%i\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v StartMenuRun /t REG_DWORD /d 1 /f
REM old windows login box
CALL reg ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v LogonType /t REG_DWORD /d 0 /f
CALL reg ADD "HKLM\SOFTWARE\Microsoft\Windows NT CurrentVersion\Winlogon" /v Welcome /t REG_DWORD /d 0 /f
CALL reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DontDisplayLastUser?ame /t REG_DWORD /d 1 /f
REM disable restore point
CALL reg ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DisableSR /t REG_DWORD /d 1 /f
REM RDP multi test
REM CALL reg ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AllowMultipleTSSessions /t REG_DWORD /d 1 /f
REM hide action center
CMD reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v HideSCAHealth /t REG_DWORD /d 0x1
REM reg ADD "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v NoSimpleStartMenu /t REG_DWORD /d 1 /f
CALL reg ADD "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v ClearRecentDocsOnExit /t REG_DWORD /d 1 /f
CALL reg ADD "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v NoSMHelp /t REG_DWORD /d 1 /f
REM enable DCOM auth without domain
CALL reg add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /v forceguest /t REG_DWORD /d 0 /f
CALL reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
REM enable the service DCOM
CALL sc config RpcSs start= auto
CALL sc start RpcSs
REM disable firewall incase
REM CALL netsh firewall set opmode disable
REM enable RDP
REM CALL reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
CALL sc config TermService start= auto
CALL sc start TermService
CALL netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
REM settings up winrm
CALL winrm quickconfig -q
CALL winrm set winrm/config/winrs @{MaxMemoryPerShellMB="512"}
CALL winrm set winrm/config @{MaxTimeoutms="1800000"}
CALL winrm set winrm/config/service @{AllowUnencrypted="true"}
CALL winrm set winrm/config/service/auth @{Basic="true"}
CALL sc config WinRM start= auto
CALL netsh advfirewall firewall set rule group="remote administration" new enable=yes
powershell Set-ExecutionPolicy unrestricted
REM disable hibernation
powercfg -h off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment