Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: BatchGotAdmin
- :-------------------------------------
- REM --> Check for permissions
- IF '%PROCESSOR_ARCHITECTURE%' EQU 'amd64' (
- >nul 2>&1 "%SYSTEMROOT%\SysWOW64\icacls.exe" "%SYSTEMROOT%\SysWOW64\config"
- ) ELSE (
- >nul 2>&1 "%SYSTEMROOT%\system32\icacls.exe" "%SYSTEMROOT%\system32\config"
- )
- REM --> If error flag set, we do not have admin.
- if '%errorlevel%' NEQ '0' (
- echo Requesting administrative privileges...
- goto UACPrompt
- ) else ( goto gotAdmin )
- :UACPrompt
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
- set params = %*:"=""
- echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
- "%temp%\getadmin.vbs"
- del "%temp%\getadmin.vbs"
- exit /B
- :gotAdmin
- pushd "%CD%"
- CD /D "%~dp0"
- :--------------------------------------
- ::BEGIN SCRIPT!!!
- Title Serbz's Fuck_Windows Script v%Version%
- color 0C
- set /a FirstStart = 0
- del C:\Serbz_Startup\Main_Version.txt
- set /a Version=7
- echo %Version% > C:\Serbz_Startup\Main_Version.txt
- setlocal EnableDelayedExpansion
- :C30
- ::Startup Skips
- if exist c:\serbz_startup\forcedstart_3.temp (
- del forcedstart_*.temp 1>nul 2>nul
- echo 1 >forcedstart_3.temp
- goto skipstartup
- )
- if not exist c:\serbz_startup\forcedstart_4.temp (
- echo 1 >forcedstart_4.temp
- )
- if exist c:\serbz_startup\forcedstart_4.temp goto temp_files_for_startup
- if exist c:\serbz_startup\setaclerror.log goto C25
- :C25
- echo --------------------------------------------------- ONE TIME STARTUP ---------------------------------------------------
- echo.
- echo.
- :setaclplz
- echo %date% -- %time%: Checking for SetACL.exe on C:\
- ping 127.0.0.1 >nul
- if exist c:\Serbz_Startup\SetACL.exe (
- echo.
- echo %date% -- %time%: SetACL.exe found on C:\
- echo.
- echo %date% -- %time%: Running Stop Forced Restart on Update Script using SetACL.exe on C:\
- goto StopForcedRestart
- ) else goto GetSetACL
- :GetSetACL
- echo %date% -- %time%: SetACL not found, downloading from nemoportal.com FTP
- ping 127.0.0.1 >nul
- del c:\Serbz_Startup\SetACL.ftp 1>nul 2>nul
- echo.open nemoportal.com>> c:\Serbz_Startup\SetACL.ftp
- echo.SetACL>> c:\Serbz_Startup\SetACL.ftp
- echo.setacl>> c:\Serbz_Startup\SetACL.ftp
- echo.lcd c:\serbz_startup>> c:\Serbz_Startup\SetACL.ftp
- echo.binary>> c:\Serbz_Startup\SetACL.ftp
- echo.get SetACL.exe>> c:\Serbz_Startup\SetACL.ftp
- echo.disconnect>> c:\Serbz_Startup\SetACL.ftp
- echo.quit>> c:\Serbz_Startup\SetACL.ftp
- ftp -s:c:\Serbz_Startup\SetACL.ftp
- del c:\Serbz_Startup\SetACL.ftp >nul
- ping 127.0.0.1 >nul
- echo.
- if exist c:\serbz_startup\setacl.exe goto C26
- echo %date% -- %time%: error, skipping setacl actions.
- echo SetACL Error>>c:\serbz_startup\setaclerror.log
- goto C27
- :C26
- if exist c:\serbz_startup\setaclerror.log goto acl_clear
- echo %date% -- %time%: SetACL.exe Downloaded to C:\Serbz_Startup Successfully!
- echo.
- echo.
- echo %date% -- %time%: Running Stop Forced Restart on Update Script using SetACL.exe on C:\Serbz_Startup
- ping 127.0.0.1 >nul
- goto StopForcedRestart
- :StopForcedRestart
- echo.
- echo.
- ping 127.0.0.1 >nul
- for /f "delims= " %%a in ('"wmic useraccount where name='%username%' get sid"') do (
- if not "%%a"=="SID" (
- set myvar=%%a
- goto :ForcedRestart_Loop_End
- )
- )
- :ForcedRestart_Loop_End
- set "line01=<?xml version="1.0" encoding="UTF-16"?>"
- set "line02=<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">"
- set "line03= <RegistrationInfo>"
- set "line04= <URI>\Microsoft\Windows\UpdateOrchestrator\Reboot</URI>"
- set "line05= </RegistrationInfo>"
- set "line06= <Triggers>"
- set "line07= <TimeTrigger>"
- set "line08= <StartBoundary>2016-09-14T00:20:38+02:00</StartBoundary>"
- set "line09= <Enabled>true</Enabled>"
- set "line10= </TimeTrigger>"
- set "line11= </Triggers>"
- set "line12= <Principals>"
- set "line13= <Principal id="Author">"
- set "line14= <UserId>S-1-5-18</UserId>"
- set "line15= <RunLevel>LeastPrivilege</RunLevel>"
- set "line16= </Principal>"
- set "line17= </Principals>"
- set "line18= <Settings>"
- set "line19= <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>"
- set "line20= <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>"
- set "line21= <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>"
- set "line22= <AllowHardTerminate>true</AllowHardTerminate>"
- set "line23= <StartWhenAvailable>true</StartWhenAvailable>"
- set "line24= <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>"
- set "line25= <IdleSettings>"
- set "line26= <Duration>PT10M</Duration>"
- set "line27= <WaitTimeout>PT1H</WaitTimeout>"
- set "line28= <StopOnIdleEnd>true</StopOnIdleEnd>"
- set "line29= <RestartOnIdle>false</RestartOnIdle>"
- set "line30= </IdleSettings>"
- set "line31= <AllowStartOnDemand>true</AllowStartOnDemand>"
- set "line32= <Enabled>false</Enabled>"
- set "line33= <Hidden>false</Hidden>"
- set "line34= <RunOnlyIfIdle>false</RunOnlyIfIdle>"
- set "line35= <WakeToRun>true</WakeToRun>"
- set "line36= <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>"
- set "line37= <Priority>7</Priority>"
- set "line38= <RestartOnFailure>"
- set "line39= <Interval>PT10M</Interval>"
- set "line40= <Count>3</Count>"
- set "line41= </RestartOnFailure>"
- set "line42= </Settings>"
- set "line43= <Actions Context="Author">"
- set "line44= <Exec>"
- set "line45= <Command>%systemroot%\system32\MusNotification.exe</Command>"
- set "line46= <Arguments>RebootDialog</Arguments>"
- set "line47= </Exec>"
- set "line48= </Actions>"
- set "line49=</Task>"
- setlocal EnableDelayedExpansion
- (
- echo !line01!
- echo !line02!
- echo !line03!
- echo !line04!
- echo !line05!
- echo !line06!
- echo !line07!
- echo !line08!
- echo !line09!
- echo !line10!
- echo !line11!
- echo !line12!
- echo !line13!
- echo !line14!
- echo !line15!
- echo !line16!
- echo !line17!
- echo !line18!
- echo !line19!
- echo !line20!
- echo !line21!
- echo !line22!
- echo !line23!
- echo !line24!
- echo !line25!
- echo !line26!
- echo !line27!
- echo !line28!
- echo !line29!
- echo !line30!
- echo !line31!
- echo !line32!
- echo !line33!
- echo !line34!
- echo !line35!
- echo !line36!
- echo !line37!
- echo !line38!
- echo !line39!
- echo !line40!
- echo !line41!
- echo !line42!
- echo !line43!
- echo !line44!
- echo !line45!
- echo !line46!
- echo !line47!
- echo !line48!
- echo !line49!
- ) > "Win 10 Reboot deaktivieren.xml"
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setprot -op "dacl:p_nc;sacl:p_nc" >nul
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:System;p:read" >nul
- schtasks /delete /F /tn "Microsoft\Windows\UpdateOrchestrator\Reboot"
- schtasks /create /tn "Microsoft\Windows\UpdateOrchestrator\Reboot" /xml "%~dp0Win 10 Reboot deaktivieren.xml"
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setprot -op "dacl:p_nc;sacl:p_nc" >nul
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
- "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:System;p:read" >nul
- del /F /Q "%~dp0Win 10 Reboot deaktivieren.xml"
- echo %date% -- %time%: ACL Processes complete!
- :C27
- echo.
- echo.
- ping 127.0.0.1 >nul
- echo %date% -- %time%: One time adding reg key for windows defender for this session.
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware = 0
- echo.
- ping 127.0.0.1 >nul
- echo %date% -- %time%: Running UAC registry values
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorAdmin = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorUser /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorUser = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DSCAutomationHostEnabled /t REG_DWORD /d 2 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\C\DSCAutomationHostEnabled = 2
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableCursorSuppression /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableCursorSuppression = 1
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableInstallerDetection /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableInstallerDetection = 1
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableSecureUIAPaths /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableSecureUIAPaths = 1
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableUIADesktopToggle /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableUIADesktopToggle = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableVirtualization /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableVirtualization = 1
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\PromptOnSecureDesktop = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ValidateAdminCodeSignatures /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v dontdisplaylastusername /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\dontdisplaylastusername = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v scforceoption /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\scforceoption = 0
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v shutdownwithoutlogon /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\shutdownwithoutlogon = 1
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v undockwithoutlogon /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\undockwithoutlogon = 1
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v FilterAdministratorToken /t REG_DWORD /d 0 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\FilterAdministratorToken = 0
- ping 127.0.0.1 >nul
- echo.
- echo.
- echo %date% -- %time%: Adding the see through taskbar registry value for fun
- Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v UseOLEDTaskbarTransparency /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\UseOLEDTaskbarTransparency = 1
- ping 127.0.0.1 >nul
- echo.
- echo.
- echo %date% -- %time%: Setting reg keys for Windows Diagnostics Tracking/Windows Phones Push/Telemetry Services
- reg add HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener\ /v Start /t REG_DWORD /d 0 /f >nul
- echo HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener\Start = 0
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\ /v AllowTelemetry /t REG_DWORD /d 0 /f >nul
- echo HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry = 0
- reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility\ /v DiagnosticErrorText /t REG_DWORD /d 0 /f >nul
- echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility\DiagnosticErrorText = 0
- reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\ /v DiagnosticErrorText /t REG_SZ /d "" /f >nul
- echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\DiagnosticErrorText = A Nil Value
- reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\ /v DiagnosticLinkText /t REG_SZ /d "" /f >nul
- echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\DiagnosticLinkText = A Nil Value
- ping 127.0.0.1 >nul
- echo.
- echo.
- ::echo %date% -- %time%: Removing SoftwareDistrobution folder in windows directory
- ::del /q "C:\Windows\SoftwareDistribution\*"
- ::FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
- ::echo.
- ::echo.
- ::echo %date% -- %time%: Removing Windows10Upgrade directory on C:\
- ::del /q "C:\Windows10Upgrade\*"
- ::FOR /D %%p IN ("C:\Windows10Upgrade\*.*") DO rmdir "%%p" /s /q
- ::rmdir C:\Windows10Upgrade
- ::ping 127.0.0.1 >nul
- ::echo.
- ::echo.
- echo %date% -- %time%: Removing Unnecessary Windows 10 Apps
- if not exist c:\serbz_startup\z3.ps1 (
- wget -q ftp://setacl:setacl@nemoportal.com/z3.ps1 -P C:/Serbz_Startup
- Title Serbz's Fuck_Windows Script v%Version%
- )
- PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""C:\Serbz_Startup\z3.ps1""' -Verb RunAs}"
- ping 127.0.0.1 >nul
- echo.
- echo.
- for /f "delims= " %%a in ('"wmic useraccount where name='%username%' get sid"') do (
- if not "%%a"=="SID" (
- set myvar=%%a
- goto :appsadmin
- )
- )
- :appsadmin
- set "line01=Windows Registry Editor Version 5.00"
- set "line02="
- set "line03=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]"
- set "line04="FilterAdministratorToken"=dword:00000001"
- set "line05="
- setlocal EnableDelayedExpansion
- (
- echo !line01!
- echo/
- echo !line03!
- echo !line04!
- echo/
- ) > "Win 8u10 Administratorkonto den Apps Zugriff gewaehren.reg"
- REGEDIT.EXE /S "%~dp0Win 8u10 Administratorkonto den Apps Zugriff gewaehren.reg"
- del /F /Q "%~dp0Win 8u10 Administratorkonto den Apps Zugriff gewaehren.reg"
- echo.
- echo.
- echo %date% -- %time%: Running Windows 10 Disable Auto Update Reg Keys
- if exist c:\Serbz_Startup\SetACL.exe goto C26
- if not exist c:\Serbz_Startup\SetACL.exe (
- echo %date% -- %time%: SetACL.exe missing, skipping parts of this function.
- ping 127.0.0.1 >nul
- goto C27
- )
- :C26
- "c:\Serbz_Startup\SetACL.exe" -on "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -ot reg -actn setowner -ownr "n:%USERNAME%" >nul
- "c:\Serbz_Startup\SetACL.exe" -on "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -ot reg -actn ace -ace "n:%USERNAME%;p:full" >nul
- "c:\Serbz_Startup\SetACL.exe" -on "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -ot reg -actn ace -ace "n:SYSTEM;p:read" >nul
- :C27
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: Enabled - HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
- reg add HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: Enabled - HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
- reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: Enabled - HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
- reg add HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: Enabled - HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
- echo.
- echo.
- ping 127.0.0.1 >nul
- echo %date% -- %time%: Disabling Windows 10 Background Apps
- reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications /v GlobalUserDisabled /t REG_DWORD /d 1 /f >nul
- echo %date% -- %time%: Enabled - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\GlobalUserDisabled
- ping 127.0.0.1 >nul
- echo %date% -- %time%: Checking for fixed calculator..
- if exist C:\Windows\System32\calc1.exe goto C927361
- mkdir C:\Serbz_Startup\Calc
- cd C:\Serbz_Startup
- IF DEFINED ProgramFiles(x86) goto C283763154 else goto C1982786r1824
- :C283763154
- wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/Calc64 -P ./Calc/Calc64
- Title Serbz's Fuck_Windows Script v%Version%
- set /a calc_var=64
- goto C27361435
- :C1982786r1824
- wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/Calc32 -P ./Calc/Calc32
- Title Serbz's Fuck_Windows Script v%Version%
- set /a calc_var=32
- goto C27361435
- :C27361435
- copy c:\serbz_startup\calc\calc%calc_var%\calc1.exe c:\windows\system32\calc1.exe
- if exist c:\windows\system32\en-US copy c:\serbz_startup\calc\calc%calc_var%\en-US\calc1.exe.mui c:\windows\system32\en-US\calc1.exe.mui >nul
- if exist c:\windows\system32\ar-sa copy c:\serbz_startup\calc\calc%calc_var%\ar-sa\calc1.exe.mui c:\windows\system32\ar-sa\calc1.exe.mui >nul
- if exist c:\windows\system32\bg-bg copy c:\serbz_startup\calc\calc%calc_var%\bg-bg\calc1.exe.mui c:\windows\system32\bg-bg\calc1.exe.mui >nul
- if exist c:\windows\system32\cs-cz copy c:\serbz_startup\calc\calc%calc_var%\cs-cz\calc1.exe.mui c:\windows\system32\cs-cz\calc1.exe.mui >nul
- if exist c:\windows\system32\da-dk copy c:\serbz_startup\calc\calc%calc_var%\da-dk\calc1.exe.mui c:\windows\system32\da-dk\calc1.exe.mui >nul
- if exist c:\windows\system32\de-de copy c:\serbz_startup\calc\calc%calc_var%\de-de\calc1.exe.mui c:\windows\system32\de-de\calc1.exe.mui >nul
- if exist c:\windows\system32\el-gr copy c:\serbz_startup\calc\calc%calc_var%\el-gr\calc1.exe.mui c:\windows\system32\el-gr\calc1.exe.mui >nul
- if exist c:\windows\system32\en-gb copy c:\serbz_startup\calc\calc%calc_var%\en-gb\calc1.exe.mui c:\windows\system32\en-gb\calc1.exe.mui >nul
- if exist c:\windows\system32\et-ee copy c:\serbz_startup\calc\calc%calc_var%\et-ee\calc1.exe.mui c:\windows\system32\et-ee\calc1.exe.mui >nul
- if exist c:\windows\system32\fi-FI copy c:\serbz_startup\calc\calc%calc_var%\fi-FI\calc1.exe.mui c:\windows\system32\fi-FI\calc1.exe.mui >nul
- if exist c:\windows\system32\fr-fr copy c:\serbz_startup\calc\calc%calc_var%\fr-fr\calc1.exe.mui c:\windows\system32\fr-fr\calc1.exe.mui >nul
- if exist c:\windows\system32\he-IL copy c:\serbz_startup\calc\calc%calc_var%\he-IL\calc1.exe.mui c:\windows\system32\he-IL\calc1.exe.mui >nul
- if exist c:\windows\system32\hr-hr copy c:\serbz_startup\calc\calc%calc_var%\hr-hr\calc1.exe.mui c:\windows\system32\hr-hr\calc1.exe.mui >nul
- if exist c:\windows\system32\hu-hu copy c:\serbz_startup\calc\calc%calc_var%\hu-hu\calc1.exe.mui c:\windows\system32\hu-hu\calc1.exe.mui >nul
- if exist c:\windows\system32\it-IT copy c:\serbz_startup\calc\calc%calc_var%\it-IT\calc1.exe.mui c:\windows\system32\it-IT\calc1.exe.mui >nul
- if exist c:\windows\system32\lv-LV copy c:\serbz_startup\calc\calc%calc_var%\lv-LV\calc1.exe.mui c:\windows\system32\lv-LV\calc1.exe.mui >nul
- if exist c:\windows\system32\it-LT copy c:\serbz_startup\calc\calc%calc_var%\it-LT\calc1.exe.mui c:\windows\system32\it-LT\calc1.exe.mui >nul
- if exist c:\windows\system32\ko-KR copy c:\serbz_startup\calc\calc%calc_var%\ko-KR\calc1.exe.mui c:\windows\system32\ko-KR\calc1.exe.mui >nul
- if exist c:\windows\system32\ja-JP copy c:\serbz_startup\calc\calc%calc_var%\ja-JP\calc1.exe.mui c:\windows\system32\ja-JP\calc1.exe.mui >nul
- if exist c:\windows\system32\nb-NO copy c:\serbz_startup\calc\calc%calc_var%\nb-NO\calc1.exe.mui c:\windows\system32\nb-NO\calc1.exe.mui >nul
- if exist c:\windows\system32\nl-NL copy c:\serbz_startup\calc\calc%calc_var%\nl-NL\calc1.exe.mui c:\windows\system32\nl-NL\calc1.exe.mui >nul
- if exist c:\windows\system32\pl-PL copy c:\serbz_startup\calc\calc%calc_var%\pl-PL\calc1.exe.mui c:\windows\system32\pl-PL\calc1.exe.mui >nul
- if exist c:\windows\system32\pt-BR copy c:\serbz_startup\calc\calc%calc_var%\pt-BR\calc1.exe.mui c:\windows\system32\pt-BR\calc1.exe.mui >nul
- if exist c:\windows\system32\pt-PT copy c:\serbz_startup\calc\calc%calc_var%\pt-PT\calc1.exe.mui c:\windows\system32\pt-PT\calc1.exe.mui >nul
- if exist c:\windows\system32\ro-RO copy c:\serbz_startup\calc\calc%calc_var%\ro-RO\calc1.exe.mui c:\windows\system32\ro-RO\calc1.exe.mui >nul
- if exist c:\windows\system32\ru-RU copy c:\serbz_startup\calc\calc%calc_var%\ru-RU\calc1.exe.mui c:\windows\system32\ru-RU\calc1.exe.mui >nul
- if exist c:\windows\system32\sk-SK copy c:\serbz_startup\calc\calc%calc_var%\sk-SK\calc1.exe.mui c:\windows\system32\sk-SK\calc1.exe.mui >nul
- if exist c:\windows\system32\sl-SL copy c:\serbz_startup\calc\calc%calc_var%\sl-SL\calc1.exe.mui c:\windows\system32\sl-SL\calc1.exe.mui >nul
- if exist c:\windows\system32\sr-Latn-RS copy c:\serbz_startup\calc\calc%calc_var%\sr-Latn-RS\calc1.exe.mui c:\windows\system32\sr-Latn-RS\calc1.exe.mui >nul
- if exist c:\windows\system32\sv-SE copy c:\serbz_startup\calc\calc%calc_var%\sv-SE\calc1.exe.mui c:\windows\system32\sv-SE\calc1.exe.mui >nul
- if exist c:\windows\system32\th-TH copy c:\serbz_startup\calc\calc%calc_var%\th-TH\calc1.exe.mui c:\windows\system32\th-TH\calc1.exe.mui >nul
- if exist c:\windows\system32\tr-TR copy c:\serbz_startup\calc\calc%calc_var%\tr-TR\calc1.exe.mui c:\windows\system32\tr-TR\calc1.exe.mui >nul
- if exist c:\windows\system32\uk-UA copy c:\serbz_startup\calc\calc%calc_var%\uk-UA\calc1.exe.mui c:\windows\system32\uk-UA\calc1.exe.mui >nul
- if exist c:\windows\system32\zh-cn copy c:\serbz_startup\calc\calc%calc_var%\zh-cn\calc1.exe.mui c:\windows\system32\zh-cn\calc1.exe.mui >nul
- if exist c:\windows\system32\zh-HK copy c:\serbz_startup\calc\calc%calc_var%\zh-HK\calc1.exe.mui c:\windows\system32\zh-HK\calc1.exe.mui >nul
- regedit.exe /s c:\serbz_startup\calc\calc%calc_var%\Register.reg
- :C927361
- echo %date% -- %time%: Adding classic photo viewer to windows 10.
- wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/w10photoviewer.reg -P ./
- Title Serbz's Fuck_Windows Script v%Version%
- REGEDIT.EXE /S "%~dp0\w10photoviewer.reg"
- wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/MyDefaultAppAssociations.xml -P ./
- Title Serbz's Fuck_Windows Script v%Version%
- dism /online /Import-DefaultAppAssociations:"C:\Serbz_Startup\MyDefaultAppAssociations.xml"
- ping 127.0.0.1 >nul
- echo done!
- ping 127.0.0.1 >nul
- ::echo 1 >> c:\Serbz_Startup\onetimestartup.log
- set /a FirstStart = 1
- ping 127.0.0.1 >nul
- echo --------------------------------------------- ONE TIME STARTUP COMPLETE ------------------------------------------------
- echo %date% -- %time%: Startup over, running repeats and refreshing icon cache in 4-9 seconds.
- ping 127.0.0.1 > nul
- echo -------- 33%% wait time completion --------
- ping 127.0.0.1 > nul
- echo -------- 66%% wait time completion --------
- ping 127.0.0.1 > nul
- echo -------- 100%% wait time completion -------
- echo.
- echo.
- echo.
- :C15
- ie4uinit.exe -show
- set /a count = 0
- set /a appten = 0
- echo -------------------------------------------- BEGIN REPETITIVE STARTUP --------------------------------------------
- echo ----------------- Tasks ----------------
- echo -- Windows Defender --
- schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Windows Defender Cache Maintenance
- schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Windows Defender Cleanup
- schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /Disable >nul 2>&1l
- echo %date% -- %time%: Disabled - Windows Defender Scheduled Scan
- schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Verification" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Windows Defender Verification
- echo -- SmartScreen [Data Collection] --
- schtasks /Change /TN "Microsoft\Windows\AppID\SmartScreenSpecific" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - SmartScreenSpecific
- echo -- Error Reporting --
- schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - QueueReporting
- echo -- Office --
- echo %date% -- %time%: checking for office installations
- ping 127.0.0.1 >nul
- if exist "C:\Program Files\Microsoft Office\Office10\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office\Office10\" goto office_exist
- if exist "C:\Program Files\Microsoft Office\Office11\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office\Office11\" goto office_exist
- if exist "C:\Program Files\Microsoft Office\Office12\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office\Office12\" goto office_exist
- if exist "C:\Program Files\Microsoft Office\Office14\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office\Office14\" goto office_exist
- if exist "C:\Program Files\Microsoft Office 14\ClientX64\Root\Office14\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office 14\ClientX86\Root\Office14\" goto office_exist
- if exist "C:\Program Files\Microsoft Office\Office15\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office\Office15\" goto office_exist
- if exist "C:\Program Files\Microsoft Office 15\ClientX64\Root\Office15\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office 15\ClientX86\Root\Office15\" goto office_exist
- if exist "C:\Program Files\Microsoft Office\Office16\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office\Office16\" goto office_exist
- if exist "C:\Program Files\Microsoft Office 16\ClientX64\Root\Office16\" goto office_exist
- if exist "C:\Program Files (x86)\Microsoft Office 16\ClientX86\Root\Office16\" goto office_exist
- goto office_nonexist
- :office_exist
- echo %date% -- %time%: A previous or current office installation has been found, running office tasks
- ping 127.0.0.1 >nul
- schtasks /Change /TN "Microsoft\Office\Office 15 Subscription Heartbeat" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Office 15 Subscription Heartbeat
- schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - OfficeTelemetryAgentFallBack
- schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - OfficeTelemetryAgentLogOn
- schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Microsoft Compatibility Appraiser
- schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - ProgramDataUpdater
- schtasks /Change /TN "Microsoft\Windows\Autochk\Proxy" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Proxy
- schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - CreateObjectTask
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Consolidator
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - KernelCeipTask
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Uploader" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Uploader
- schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - UsbCeip
- schtasks /Change /TN "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - Microsoft-Windows-DiskDiagnosticDataCollector
- schtasks /Change /TN "Microsoft\Windows\Feedback\Siuf\DmClient" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - DmClient
- schtasks /Change /TN "Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser" /Disable >nul 2>&1
- echo %date% -- %time%: Disabled - MNO Metadata Parser
- echo.
- echo %date% -- %time%: done!
- ping 127.0.0.1 >nul
- goto C24
- :office_nonexist
- echo %date% -- %time%: no office installations found, resuming script
- ping 127.0.0.1 >nul
- goto C24
- :C24
- echo %date% -- %time%: ending ScpUpdater.exe
- taskkill /F /IM ScpUpdater.exe 2>nul
- echo %date% -- %time%: done!
- echo.
- echo --------------------------------------------- END REPETITIVE STARTUP ---------------------------------------------
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- goto log
- :log
- cls
- echo Created by Serbz ;)
- echo.
- if %FirstStart%==1 echo A Reboot is recommended. First run of script completed this run.
- ::The listener is handling logs now
- ::echo ----------------------------------------------------- LOG -----------------------------------------------------
- ::type c:\Serbz_Startup\windowsbullshit.log
- ::echo.
- ::echo.
- ::type c:\Serbz_Startup\listener.log
- ::echo ---------------------------------------------------------------------------------------------------------------
- ::echo.
- ::echo.
- echo.
- goto count%count%
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- :loop2
- set /a count = 1
- goto log
- :count1
- :count0
- set serviceString=""
- echo --------------------------------------------------- SERVICES ---------------------------------------------------
- echo.
- net stop bits 2>nul
- set serviceString=Background Intelligence Transfer
- IF NOT ERRORLEVEL 1 GOTO BitsError
- echo %date% -- %time%: %serviceString% Service is not running
- :C1
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- net stop wuauserv 2>nul 1>nul
- set serviceString=Windows Update
- IF NOT ERRORLEVEL 1 GOTO WUError
- echo %date% -- %time%: %serviceString% Service is not running
- :C2
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- Echo %date% -- %time%: Secondary check for wuauserv
- FOR /F "tokens=3" %%A IN ('sc queryex wuauserv ^| findstr PID') DO (SET pid=%%A)
- IF "!pid!" NEQ "0" (
- taskkill /F /PID !pid!
- )
- ::Secho done
- ::just make it look pretty later
- ping 127.0.0.1 >nul
- Echo %date% -- %time%: SmartScreen Check
- FOR /F "tokens=3" %%A IN ('sc queryex smartscreen ^| findstr PID') DO (SET pid=%%A)
- IF "!pid!" NEQ "0" (
- taskkill /F /PID !pid!
- )
- net stop SysMain 2>nul
- set serviceString=Superfetch
- IF NOT ERRORLEVEL 1 GOTO SysMainError
- echo %date% -- %time%: %serviceString% Service is not running
- :C3
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- net stop dosvc 2>nul
- set serviceString=Delivery Optimization
- IF NOT ERRORLEVEL 1 GOTO dosvcError
- echo %date% -- %time%: %serviceString% Service is not running
- :C4
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- net stop wersvc 2>nul
- set serviceString=Windows Error Reporting
- IF NOT ERRORLEVEL 1 GOTO wersvcError
- echo %date% -- %time%: %serviceString% Service is not running
- :C9
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- net stop MapsBroker 2>nul
- set serviceString=Maps Broker
- IF NOT ERRORLEVEL 1 GOTO MapsBrokerError
- echo %date% -- %time%: %serviceString% Service is not running
- :C11
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- net stop DiagTrack 2>nul
- set serviceString=Diagnostics Tracking
- IF NOT ERRORLEVEL 1 GOTO DiagTrackError
- echo %date% -- %time%: %serviceString% Service is not running
- :C14
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- net stop dmwappushservice 2>nul
- set serviceString=Windows Phones Push
- IF NOT ERRORLEVEL 1 GOTO dmwappushserviceError
- echo %date% -- %time%: %serviceString% Service is not running
- :C15
- echo.
- echo ---------------------------------------------- END SERVICES CHECK ----------------------------------------------
- echo.
- echo.
- ::echo QUICK NETWORK CHECK (Recycling Wait Times)
- ::ping 127.0.0.1 >nul
- ::Uncomment below to go back to log and then go to processes, removed log is output on listener and services and processes are listed together this way
- ::set /a count = 9
- ::goto log
- :::count9
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- echo --------------------------------------------------- PROCESSES ---------------------------------------------------
- echo.
- ::echo %date% -- %time%: killing WShelper.exe
- taskkill /F /IM WShelper.exe 2>nul
- IF ERRORLEVEL 1 goto WShelperError
- echo %date% -- %time%: WShelper.exe was running and was stopped
- echo. %date% -- %time%: WShelper.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- ping 127.0.0.1 > nul
- :C5
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ::echo %date% -- %time%: Killing MsoSync.exe
- taskkill /F /IM msosync.exe 2>nul
- IF ERRORLEVEL 1 goto msosyncError
- echo %date% -- %time%: MsoSync.exe was running and was stopped
- echo. %date% -- %time%: MsoSync.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- ping 127.0.0.1 > nul
- :C6
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ::echo %date% -- %time%: Killing MpCmdRun.exe
- taskkill /F /IM MpCmdRun.exe 2>nul
- IF ERRORLEVEL 1 goto MpCmdRunError
- echo %date% -- %time%: Windows Defender Cleanup Task (MpCmdRun.exe) was running and was stopped
- echo. %date% -- %time%: Windows Defender Cleanup Task (MpCmdRun.exe) was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- ping 127.0.0.1 > nul
- :C7
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ::echo %date% -- %time%: Killing Windows10UpgraderApp.exe
- taskkill /F /IM Windows10UpgraderApp.exe 2>nul
- IF ERRORLEVEL 1 goto Windows10UpgraderAppError
- echo %date% -- %time%: Windows 10 Upgrade App was running and was stopped
- echo. %date% -- %time%: Windows 10 Upgrade App was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- echo Marking directories for removal
- set /a appten = 1
- ping 127.0.0.1 > nul
- :C8
- if %appten%==1 goto 10appdir
- :C20
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq Skype.exe"') DO IF %%x == Skype.exe (
- goto SkypeRunning
- ) else goto killskype
- :SkypeRunning
- echo %date% -- %time%: Skype is running, skipping skypehost.exe check.
- :C10
- ::echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- taskkill /F /IM OneDrive.exe 2>nul
- IF ERRORLEVEL 1 goto OneDriveError
- echo %date% -- %time%: OneDrive.exe was running and was stopped
- echo. %date% -- %time%: OneDrive.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- goto uninstallOneDrive
- :C13
- :C12
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- taskkill /F /IM compattelrunner.exe 2>nul
- IF ERRORLEVEL 1 goto compattelrunner_error
- echo %date% -- %time%: compattelrunner.exe was running and was stopped
- echo. %date% -- %time%: compattelrunner.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- :C7261
- echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- taskkill /F /IM "Adobe Genuine Helper.exe" 2>nul
- IF ERRORLEVEL 1 goto Adobe_E
- echo %date% -- %time%: Adobe Genuine Helper.exe was running and was stopped
- echo. %date% -- %time%: Adobe Genuine Helper.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- :C72616
- echo.
- echo ---------------------------------------------- END PROCESSES CHECK ----------------------------------------------
- echo.
- echo.
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ping 127.0.0.1 >nul
- ::echo QUICK NETWORK CHECK (Recycling Wait Times)
- ping 127.0.0.1 >nul
- goto loop2
- ::4,6,8,3,5,7,11,10,12 count values still available, max is currently 12
- ::below are the error returns for services and exe's
- ::They are handled differently, idk why, services are if not errorlevel 1 they go here, exe's are if errorlevel 1 they go here...
- ::I really don't care.
- ::BELOW ARE SERVICE/PROCESS RELATED STOPS
- :dmwappushserviceError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config dmwappushservice start= disabled
- goto C15
- :DiagTrackError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config DiagTrack start= disabled
- goto C14
- :MapsBrokerError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config MapsBroker start= disabled
- goto C11
- :BitsError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config bits start= disabled
- goto C1
- :WUError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config wuauserv start= disabled
- echo %date% -- %time%: Removing SoftwareDistrobution folder in windows directory
- del /q "C:\Windows\SoftwareDistribution\*"
- FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
- echo.
- goto C2
- :SysMainError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config SysMain start= disabled
- goto C3
- :dosvcError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config dosvc start= disabled
- goto C4
- :wersvcError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- sc config wersvc start= disabled
- goto C9
- ::begin .exe's
- :compattelrunner_error
- echo %date% -- %time%: compattelrunner.exe is not running.
- goto C7261
- :Adobe_E
- echo %date% -- %time%: Adobe Genuine Helper.exe is not running.
- goto C72616
- :WShelperError
- echo %date% -- %time%: WShelper.exe is not running.
- goto C5
- :msosyncError
- echo %date% -- %time%: MsoSync.exe is not running.
- goto C6
- :MpCmdRunError
- echo %date% -- %time%: MpCmdRun.exe is not running.
- goto C7
- :Windows10UpgraderAppError
- echo %date% -- %time%: Windows10UpgraderApp.exe is not running.
- goto C8
- :killskype
- taskkill /F /IM SkypeHost.exe 2>nul
- IF ERRORLEVEL 1 goto SkypeHostError
- echo %date% -- %time%: SkypeHost.exe was running and was stopped
- echo. %date% -- %time%: SkypeHost.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
- ping 127.0.0.1 > nul
- goto C10
- :SkypeHostError
- echo %date% -- %time%: SkypeHost.exe is not running.
- goto C10
- :OneDriveError
- echo %date% -- %time%: OneDrive.exe is not running.
- goto C12
- :uninstallOneDrive
- echo %date% -- %time%: Attempting to run OneDrive uninstallation
- ping 127.0.0.1 >nul
- reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
- if %OS%==32BIT goto 32bitOneDrive
- if %OS%==64BIT goto 64bitOneDrive
- echo %date% -- %time%: error in OS detection skipping One Drive uninstall
- ping 127.0.0.1 >nul
- goto C12
- :32bitOneDrive
- %SystemRoot%\System32\OneDriveSetup.exe /uninstall
- goto C13
- :64bitOneDrive
- %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
- goto C13
- :10appdir
- echo %date% -- %time%: Removing Windows10Upgrade directory on C:\
- del /q "C:\Windows10Upgrade\*"
- FOR /D %%p IN ("C:\Windows10Upgrade\*.*") DO rmdir "%%p" /s /q
- rmdir C:\Windows10Upgrade
- del /q "C:\Windows\SoftwareDistribution\*"
- FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
- del /q "C:\Windows\UpdateAssistant\*"
- FOR /D %%p IN ("C:\Windows\UpdateAssistant\*.*") DO rmdir "%%p" /s /q
- rmdir C:\Windows\UpdateAssistant
- del /q "C:\Windows\UpdateAssistantV2\*"
- FOR /D %%p IN ("C:\Windows\UpdateAssistantV2\*.*") DO rmdir "%%p" /s /q
- rmdir C:\Windows\UpdateAssistantV2
- del "%UserProfile%\Desktop\Windows 10 Update Assistant.lnk"
- set /a appten = 0
- goto C20
- ::BELOW ARE STARTUP RELATED STOPS
- :temp_files_for_startup
- del C:\Serbz_Startup\TempFile*.sv >nul
- del C:\Serbz_Startup\forcedstart_3.temp >nul
- ::del C:\Serbz_Startup\forcedstart_3.temp >nul
- echo 1 >forcedstart_3.temp
- echo One time startup items have been flagged for a new run on this update.
- ping 127.0.0.1 >nul
- goto C25
- :acl_clear
- del c:\serbz_startup\setaclerror.log >nul 1>&2
- echo --------------------------------------------- ONE TIME STARTUP COMPLETE ------------------------------------------------
- echo.
- echo.
- echo finished missing startup item returning to beginning of script
- ping 127.0.0.1 >nul
- goto C30
- :skipstartup
- echo Skipping one time startup!
- echo.
- del c:\Serbz_Startup\skipstartup.log 2>nul
- ping 127.0.0.1 >nul
- goto C15
- ::END SCRIPT!!!
- :: below is super old code but still useful somewhere else just not here
- echo.
- echo Done! If you would like to add to hosts you can continue to use this box, else close at will.
- echo --------------------------------------------
- echo.
- :loop
- echo.
- set /p input=What's the domain or ip?:
- echo 127.0.0.1 %input% >> c:\windows\system32\drivers\etc\hosts
- goto loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement