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!!!
- ::Enable line below if you want the script to start minimized
- ::if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
- Title Fuck Windows, and Fuck Microsoft
- color 0C
- echo --------------------------------------------------- STARTUP ---------------------------------------------------
- echo.
- echo.
- :setaclplz
- echo %date% -- %time%: Checking for SetACL.exe on C:\
- ping 127.0.0.1 >nul
- if exist C:\SetACL.exe (
- echo.
- echo SetACL.exe found on C:\
- echo.
- echo Running Stop Forced Restart on Update Script using SetACL.exe on C:\
- goto StopForcedRestart
- ) else goto GetSetACL
- :GetSetACL
- echo SetACL not found, downloading from nemoportal.com FTP
- ping 127.0.0.1 >nul
- del C:\SetACL.ftp 1>nul 2>nul
- echo.open nemoportal.com>> C:\SetACL.ftp
- echo.SetACL>> C:\SetACL.ftp
- echo.setacl>> C:\SetACL.ftp
- echo.lcd c:\>> C:\SetACL.ftp
- echo.binary>> C:\SetACL.ftp
- echo.get SetACL.exe>> C:\SetACL.ftp
- echo.disconnect>> C:\SetACL.ftp
- echo.quit>> C:\SetACL.ftp
- ftp -s:C:\SetACL.ftp
- del C:\SetACL.ftp >nul
- ping 127.0.0.1 >nul
- echo.
- echo SetACL.exe Downloaded to C:\ Successfully!
- echo.
- echo.
- echo Running Stop Forced Restart on Update Script using SetACL.exe on C:\
- 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:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setprot -op "dacl:p_nc;sacl:p_nc" >nul
- "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
- "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
- "C:\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:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setprot -op "dacl:p_nc;sacl:p_nc" >nul
- "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
- "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
- "C:\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 ACL Processes complete!
- 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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
- ping 127.0.0.1 >nul
- 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
- PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dp0\z3.ps1""' -Verb RunAs}"
- ping 127.0.0.1 >nul
- echo.
- echo.
- ping 127.0.0.1 >nul
- echo --------------------------------------------- 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.
- ie4uinit.exe -show
- set /a count = 0
- :log
- cls
- echo Created by Serbz ;)
- echo.
- echo ----------------------------------------------------- LOG -----------------------------------------------------
- type c:\windowsbullshit.log
- echo ---------------------------------------------------------------------------------------------------------------
- echo.
- echo.
- echo.
- goto count%count%
- :loop2
- :count0
- set serviceString=""
- echo.
- ping 127.0.0.1 > nul
- set /a count = 1
- goto log
- :count1
- 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.
- 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.
- net stop SysMain 2>nul
- set serviceString=Superfetch
- IF NOT ERRORLEVEL 1 GOTO SysMainError
- echo %date% -- %time%: %serviceString% Service is not running
- :C3
- echo.
- 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.
- 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.
- 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.
- 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.
- 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 ----------------------------------------------
- ping 127.0.0.1 > nul
- set /a count = 9
- goto log
- :count9
- 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:\WindowsBullshit.log
- ping 127.0.0.1 > nul
- :C5
- echo.
- ::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:\WindowsBullshit.log
- ping 127.0.0.1 > nul
- :C6
- echo.
- ::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:\WindowsBullshit.log
- ping 127.0.0.1 > nul
- :C7
- echo.
- ::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:\WindowsBullshit.log
- 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
- :C8
- echo.
- 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.
- 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:\WindowsBullshit.log
- goto uninstallOneDrive
- :C13
- ping 127.0.0.1 > nul
- :C12
- echo.
- echo ---------------------------------------------- END PROCESSES CHECK ----------------------------------------------
- ping 127.0.0.1 > nul
- set /a count = 2
- goto log
- :count2
- echo -------------------------------------------------- PROCESS LIST -------------------------------------------------
- del c:\tasklisttitle.log
- del c:\tasklistimage.log
- TASKLIST /v /fo list |find /i "window title" |find /v "N/A" >> c:\tasklisttitle.log
- TASKLIST /v /fo list |find /i "image name" |find /v "N/A" >> c:\tasklistimage.log
- type c:\tasklisttitle.log
- echo -----------------------------------------------------------------------------------------------------------------
- ping 127.0.0.1 > nul
- set /a count = 3
- goto log
- :count3
- ::echo.
- ::echo.
- ::echo QUICK NETWORK CHECK
- ::ping 8.8.8.8
- 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.
- ::begin services
- :dmwappushserviceError
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\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:\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:\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:\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:\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:\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:\WindowsBullshit.log
- sc config dosvc start= disabled
- goto C4
- :wersvc
- echo %date% -- %time%: %serviceString% was running and was stopped
- echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
- sc config wersvc start= disabled
- goto C9
- ::begin .exe's
- :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:\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
- ::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