Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.32 KB | None | 0 0
  1. @echo off
  2.  
  3.  
  4. :: BatchGotAdmin
  5. :-------------------------------------
  6. REM --> Check for permissions
  7. IF '%PROCESSOR_ARCHITECTURE%' EQU 'amd64' (
  8. >nul 2>&1 "%SYSTEMROOT%\SysWOW64\icacls.exe" "%SYSTEMROOT%\SysWOW64\config"
  9. ) ELSE (
  10. >nul 2>&1 "%SYSTEMROOT%\system32\icacls.exe" "%SYSTEMROOT%\system32\config"
  11. )
  12.  
  13. REM --> If error flag set, we do not have admin.
  14. if '%errorlevel%' NEQ '0' (
  15. echo Requesting administrative privileges...
  16. goto UACPrompt
  17. ) else ( goto gotAdmin )
  18.  
  19. :UACPrompt
  20. echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  21. set params = %*:"=""
  22. echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  23.  
  24. "%temp%\getadmin.vbs"
  25. del "%temp%\getadmin.vbs"
  26. exit /B
  27.  
  28. :gotAdmin
  29. pushd "%CD%"
  30. CD /D "%~dp0"
  31. :--------------------------------------
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43. ::BEGIN SCRIPT!!!
  44. Title Serbz's Fuck_Windows Script v%Version%
  45. color 0C
  46. set /a FirstStart = 0
  47. del C:\Serbz_Startup\Main_Version.txt
  48. set /a Version=7
  49. echo %Version% > C:\Serbz_Startup\Main_Version.txt
  50. setlocal EnableDelayedExpansion
  51.  
  52.  
  53.  
  54.  
  55. :C30
  56. ::Startup Skips
  57. if exist c:\serbz_startup\forcedstart_3.temp (
  58. del forcedstart_*.temp 1>nul 2>nul
  59. echo 1 >forcedstart_3.temp
  60. goto skipstartup
  61. )
  62. if not exist c:\serbz_startup\forcedstart_4.temp (
  63. echo 1 >forcedstart_4.temp
  64. )
  65.  
  66. if exist c:\serbz_startup\forcedstart_4.temp goto temp_files_for_startup
  67. if exist c:\serbz_startup\setaclerror.log goto C25
  68. :C25
  69. echo --------------------------------------------------- ONE TIME STARTUP ---------------------------------------------------
  70.  
  71.  
  72. echo.
  73. echo.
  74. :setaclplz
  75. echo %date% -- %time%: Checking for SetACL.exe on C:\
  76. ping 127.0.0.1 >nul
  77. if exist c:\Serbz_Startup\SetACL.exe (
  78. echo.
  79. echo %date% -- %time%: SetACL.exe found on C:\
  80. echo.
  81. echo %date% -- %time%: Running Stop Forced Restart on Update Script using SetACL.exe on C:\
  82. goto StopForcedRestart
  83. ) else goto GetSetACL
  84. :GetSetACL
  85. echo %date% -- %time%: SetACL not found, downloading from nemoportal.com FTP
  86. ping 127.0.0.1 >nul
  87. del c:\Serbz_Startup\SetACL.ftp 1>nul 2>nul
  88. echo.open nemoportal.com>> c:\Serbz_Startup\SetACL.ftp
  89. echo.SetACL>> c:\Serbz_Startup\SetACL.ftp
  90. echo.setacl>> c:\Serbz_Startup\SetACL.ftp
  91. echo.lcd c:\serbz_startup>> c:\Serbz_Startup\SetACL.ftp
  92. echo.binary>> c:\Serbz_Startup\SetACL.ftp
  93. echo.get SetACL.exe>> c:\Serbz_Startup\SetACL.ftp
  94. echo.disconnect>> c:\Serbz_Startup\SetACL.ftp
  95. echo.quit>> c:\Serbz_Startup\SetACL.ftp
  96. ftp -s:c:\Serbz_Startup\SetACL.ftp
  97. del c:\Serbz_Startup\SetACL.ftp >nul
  98. ping 127.0.0.1 >nul
  99. echo.
  100. if exist c:\serbz_startup\setacl.exe goto C26
  101. echo %date% -- %time%: error, skipping setacl actions.
  102. echo SetACL Error>>c:\serbz_startup\setaclerror.log
  103. goto C27
  104. :C26
  105. if exist c:\serbz_startup\setaclerror.log goto acl_clear
  106. echo %date% -- %time%: SetACL.exe Downloaded to C:\Serbz_Startup Successfully!
  107. echo.
  108. echo.
  109. echo %date% -- %time%: Running Stop Forced Restart on Update Script using SetACL.exe on C:\Serbz_Startup
  110. ping 127.0.0.1 >nul
  111. goto StopForcedRestart
  112.  
  113.  
  114.  
  115.  
  116. :StopForcedRestart
  117. echo.
  118. echo.
  119. ping 127.0.0.1 >nul
  120. for /f "delims= " %%a in ('"wmic useraccount where name='%username%' get sid"') do (
  121. if not "%%a"=="SID" (
  122. set myvar=%%a
  123. goto :ForcedRestart_Loop_End
  124. )
  125. )
  126.  
  127. :ForcedRestart_Loop_End
  128. set "line01=<?xml version="1.0" encoding="UTF-16"?>"
  129. set "line02=<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">"
  130. set "line03= <RegistrationInfo>"
  131. set "line04= <URI>\Microsoft\Windows\UpdateOrchestrator\Reboot</URI>"
  132. set "line05= </RegistrationInfo>"
  133. set "line06= <Triggers>"
  134. set "line07= <TimeTrigger>"
  135. set "line08= <StartBoundary>2016-09-14T00:20:38+02:00</StartBoundary>"
  136. set "line09= <Enabled>true</Enabled>"
  137. set "line10= </TimeTrigger>"
  138. set "line11= </Triggers>"
  139. set "line12= <Principals>"
  140. set "line13= <Principal id="Author">"
  141. set "line14= <UserId>S-1-5-18</UserId>"
  142. set "line15= <RunLevel>LeastPrivilege</RunLevel>"
  143. set "line16= </Principal>"
  144. set "line17= </Principals>"
  145. set "line18= <Settings>"
  146. set "line19= <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>"
  147. set "line20= <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>"
  148. set "line21= <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>"
  149. set "line22= <AllowHardTerminate>true</AllowHardTerminate>"
  150. set "line23= <StartWhenAvailable>true</StartWhenAvailable>"
  151. set "line24= <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>"
  152. set "line25= <IdleSettings>"
  153. set "line26= <Duration>PT10M</Duration>"
  154. set "line27= <WaitTimeout>PT1H</WaitTimeout>"
  155. set "line28= <StopOnIdleEnd>true</StopOnIdleEnd>"
  156. set "line29= <RestartOnIdle>false</RestartOnIdle>"
  157. set "line30= </IdleSettings>"
  158. set "line31= <AllowStartOnDemand>true</AllowStartOnDemand>"
  159. set "line32= <Enabled>false</Enabled>"
  160. set "line33= <Hidden>false</Hidden>"
  161. set "line34= <RunOnlyIfIdle>false</RunOnlyIfIdle>"
  162. set "line35= <WakeToRun>true</WakeToRun>"
  163. set "line36= <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>"
  164. set "line37= <Priority>7</Priority>"
  165. set "line38= <RestartOnFailure>"
  166. set "line39= <Interval>PT10M</Interval>"
  167. set "line40= <Count>3</Count>"
  168. set "line41= </RestartOnFailure>"
  169. set "line42= </Settings>"
  170. set "line43= <Actions Context="Author">"
  171. set "line44= <Exec>"
  172. set "line45= <Command>%systemroot%\system32\MusNotification.exe</Command>"
  173. set "line46= <Arguments>RebootDialog</Arguments>"
  174. set "line47= </Exec>"
  175. set "line48= </Actions>"
  176. set "line49=</Task>"
  177. setlocal EnableDelayedExpansion
  178. (
  179. echo !line01!
  180. echo !line02!
  181. echo !line03!
  182. echo !line04!
  183. echo !line05!
  184. echo !line06!
  185. echo !line07!
  186. echo !line08!
  187. echo !line09!
  188. echo !line10!
  189. echo !line11!
  190. echo !line12!
  191. echo !line13!
  192. echo !line14!
  193. echo !line15!
  194. echo !line16!
  195. echo !line17!
  196. echo !line18!
  197. echo !line19!
  198. echo !line20!
  199. echo !line21!
  200. echo !line22!
  201. echo !line23!
  202. echo !line24!
  203. echo !line25!
  204. echo !line26!
  205. echo !line27!
  206. echo !line28!
  207. echo !line29!
  208. echo !line30!
  209. echo !line31!
  210. echo !line32!
  211. echo !line33!
  212. echo !line34!
  213. echo !line35!
  214. echo !line36!
  215. echo !line37!
  216. echo !line38!
  217. echo !line39!
  218. echo !line40!
  219. echo !line41!
  220. echo !line42!
  221. echo !line43!
  222. echo !line44!
  223. echo !line45!
  224. echo !line46!
  225. echo !line47!
  226. echo !line48!
  227. echo !line49!
  228. ) > "Win 10 Reboot deaktivieren.xml"
  229. "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
  230. "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
  231. "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
  232. "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:System;p:read" >nul
  233. schtasks /delete /F /tn "Microsoft\Windows\UpdateOrchestrator\Reboot"
  234. schtasks /create /tn "Microsoft\Windows\UpdateOrchestrator\Reboot" /xml "%~dp0Win 10 Reboot deaktivieren.xml"
  235. "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
  236. "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
  237. "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
  238. "c:\Serbz_Startup\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:System;p:read" >nul
  239. del /F /Q "%~dp0Win 10 Reboot deaktivieren.xml"
  240. echo %date% -- %time%: ACL Processes complete!
  241.  
  242. :C27
  243. echo.
  244. echo.
  245. ping 127.0.0.1 >nul
  246. echo %date% -- %time%: One time adding reg key for windows defender for this session.
  247. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f >nul
  248. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware = 0
  249. echo.
  250. ping 127.0.0.1 >nul
  251. echo %date% -- %time%: Running UAC registry values
  252. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f >nul
  253. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorAdmin = 0
  254. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f >nul
  255. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA = 0
  256. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorUser /t REG_DWORD /d 0 /f >nul
  257. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorUser = 0
  258. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DSCAutomationHostEnabled /t REG_DWORD /d 2 /f >nul
  259. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\C\DSCAutomationHostEnabled = 2
  260. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableCursorSuppression /t REG_DWORD /d 1 /f >nul
  261. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableCursorSuppression = 1
  262. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableInstallerDetection /t REG_DWORD /d 1 /f >nul
  263. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableInstallerDetection = 1
  264. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableSecureUIAPaths /t REG_DWORD /d 1 /f >nul
  265. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableSecureUIAPaths = 1
  266. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableUIADesktopToggle /t REG_DWORD /d 0 /f >nul
  267. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableUIADesktopToggle = 0
  268. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableVirtualization /t REG_DWORD /d 1 /f >nul
  269. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableVirtualization = 1
  270. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f >nul
  271. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\PromptOnSecureDesktop = 0
  272. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ValidateAdminCodeSignatures /t REG_DWORD /d 0 /f >nul
  273. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures = 0
  274. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v dontdisplaylastusername /t REG_DWORD /d 0 /f >nul
  275. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\dontdisplaylastusername = 0
  276. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v scforceoption /t REG_DWORD /d 0 /f >nul
  277. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\scforceoption = 0
  278. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v shutdownwithoutlogon /t REG_DWORD /d 1 /f >nul
  279. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\shutdownwithoutlogon = 1
  280. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v undockwithoutlogon /t REG_DWORD /d 1 /f >nul
  281. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\undockwithoutlogon = 1
  282. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v FilterAdministratorToken /t REG_DWORD /d 0 /f >nul
  283. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\FilterAdministratorToken = 0
  284. ping 127.0.0.1 >nul
  285. echo.
  286. echo.
  287. echo %date% -- %time%: Adding the see through taskbar registry value for fun
  288. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v UseOLEDTaskbarTransparency /t REG_DWORD /d 1 /f >nul
  289. echo %date% -- %time%: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\UseOLEDTaskbarTransparency = 1
  290. ping 127.0.0.1 >nul
  291. echo.
  292. echo.
  293. echo %date% -- %time%: Setting reg keys for Windows Diagnostics Tracking/Windows Phones Push/Telemetry Services
  294. reg add HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener\ /v Start /t REG_DWORD /d 0 /f >nul
  295. echo HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener\Start = 0
  296. reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\ /v AllowTelemetry /t REG_DWORD /d 0 /f >nul
  297. echo HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry = 0
  298. reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility\ /v DiagnosticErrorText /t REG_DWORD /d 0 /f >nul
  299. echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility\DiagnosticErrorText = 0
  300. reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\ /v DiagnosticErrorText /t REG_SZ /d "" /f >nul
  301. echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\DiagnosticErrorText = A Nil Value
  302. reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\ /v DiagnosticLinkText /t REG_SZ /d "" /f >nul
  303. echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\DiagnosticLinkText = A Nil Value
  304. ping 127.0.0.1 >nul
  305. echo.
  306. echo.
  307. ::echo %date% -- %time%: Removing SoftwareDistrobution folder in windows directory
  308. ::del /q "C:\Windows\SoftwareDistribution\*"
  309. ::FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
  310. ::echo.
  311. ::echo.
  312. ::echo %date% -- %time%: Removing Windows10Upgrade directory on C:\
  313. ::del /q "C:\Windows10Upgrade\*"
  314. ::FOR /D %%p IN ("C:\Windows10Upgrade\*.*") DO rmdir "%%p" /s /q
  315. ::rmdir C:\Windows10Upgrade
  316. ::ping 127.0.0.1 >nul
  317. ::echo.
  318. ::echo.
  319. echo %date% -- %time%: Removing Unnecessary Windows 10 Apps
  320. if not exist c:\serbz_startup\z3.ps1 (
  321. wget -q ftp://setacl:setacl@nemoportal.com/z3.ps1 -P C:/Serbz_Startup
  322. Title Serbz's Fuck_Windows Script v%Version%
  323. )
  324. PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""C:\Serbz_Startup\z3.ps1""' -Verb RunAs}"
  325. ping 127.0.0.1 >nul
  326. echo.
  327. echo.
  328. for /f "delims= " %%a in ('"wmic useraccount where name='%username%' get sid"') do (
  329. if not "%%a"=="SID" (
  330. set myvar=%%a
  331. goto :appsadmin
  332. )
  333. )
  334.  
  335. :appsadmin
  336. set "line01=Windows Registry Editor Version 5.00"
  337. set "line02="
  338. set "line03=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]"
  339. set "line04="FilterAdministratorToken"=dword:00000001"
  340. set "line05="
  341.  
  342. setlocal EnableDelayedExpansion
  343. (
  344. echo !line01!
  345. echo/
  346. echo !line03!
  347. echo !line04!
  348. echo/
  349.  
  350. ) > "Win 8u10 Administratorkonto den Apps Zugriff gewaehren.reg"
  351. REGEDIT.EXE /S "%~dp0Win 8u10 Administratorkonto den Apps Zugriff gewaehren.reg"
  352. del /F /Q "%~dp0Win 8u10 Administratorkonto den Apps Zugriff gewaehren.reg"
  353. echo.
  354. echo.
  355.  
  356. echo %date% -- %time%: Running Windows 10 Disable Auto Update Reg Keys
  357. if exist c:\Serbz_Startup\SetACL.exe goto C26
  358. if not exist c:\Serbz_Startup\SetACL.exe (
  359. echo %date% -- %time%: SetACL.exe missing, skipping parts of this function.
  360. ping 127.0.0.1 >nul
  361. goto C27
  362. )
  363. :C26
  364. "c:\Serbz_Startup\SetACL.exe" -on "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -ot reg -actn setowner -ownr "n:%USERNAME%" >nul
  365. "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
  366. "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
  367. :C27
  368. reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
  369. echo %date% -- %time%: Enabled - HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
  370. reg add HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
  371. echo %date% -- %time%: Enabled - HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
  372. reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
  373. echo %date% -- %time%: Enabled - HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
  374. reg add HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\ /v NoAutoUpdate /t REG_DWORD /d 1 /f >nul
  375. echo %date% -- %time%: Enabled - HKLM\SOFTWARE\WOW6432Node\Policies\Microsoft\Windows\WindowsUpdate\AU\NoAutoUpdate
  376. echo.
  377. echo.
  378. ping 127.0.0.1 >nul
  379.  
  380. echo %date% -- %time%: Disabling Windows 10 Background Apps
  381. reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications /v GlobalUserDisabled /t REG_DWORD /d 1 /f >nul
  382. echo %date% -- %time%: Enabled - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\GlobalUserDisabled
  383. ping 127.0.0.1 >nul
  384.  
  385. echo %date% -- %time%: Checking for fixed calculator..
  386. if exist C:\Windows\System32\calc1.exe goto C927361
  387. mkdir C:\Serbz_Startup\Calc
  388. cd C:\Serbz_Startup
  389. IF DEFINED ProgramFiles(x86) goto C283763154 else goto C1982786r1824
  390. :C283763154
  391. wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/Calc64 -P ./Calc/Calc64
  392. Title Serbz's Fuck_Windows Script v%Version%
  393. set /a calc_var=64
  394. goto C27361435
  395. :C1982786r1824
  396. wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/Calc32 -P ./Calc/Calc32
  397. Title Serbz's Fuck_Windows Script v%Version%
  398. set /a calc_var=32
  399. goto C27361435
  400.  
  401. :C27361435
  402. copy c:\serbz_startup\calc\calc%calc_var%\calc1.exe c:\windows\system32\calc1.exe
  403. 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
  404. 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
  405. 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
  406. 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
  407. 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
  408. 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
  409. 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
  410. 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
  411. 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
  412. 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
  413. 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
  414. 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
  415. 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
  416. 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
  417. 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
  418. 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
  419. 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
  420. 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
  421. 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
  422. 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
  423. 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
  424. 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
  425. 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
  426. 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
  427. 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
  428. 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
  429. 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
  430. 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
  431. 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
  432. 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
  433. 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
  434. 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
  435. 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
  436. 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
  437. 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
  438.  
  439. regedit.exe /s c:\serbz_startup\calc\calc%calc_var%\Register.reg
  440. :C927361
  441. echo %date% -- %time%: Adding classic photo viewer to windows 10.
  442. wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/w10photoviewer.reg -P ./
  443. Title Serbz's Fuck_Windows Script v%Version%
  444. REGEDIT.EXE /S "%~dp0\w10photoviewer.reg"
  445. wget -q -np -nH --cut-dirs 1 -m ftp://setacl:setacl@nemoportal.com/MyDefaultAppAssociations.xml -P ./
  446. Title Serbz's Fuck_Windows Script v%Version%
  447. dism /online /Import-DefaultAppAssociations:"C:\Serbz_Startup\MyDefaultAppAssociations.xml"
  448. ping 127.0.0.1 >nul
  449. echo done!
  450. ping 127.0.0.1 >nul
  451.  
  452. ::echo 1 >> c:\Serbz_Startup\onetimestartup.log
  453. set /a FirstStart = 1
  454.  
  455. ping 127.0.0.1 >nul
  456. echo --------------------------------------------- ONE TIME STARTUP COMPLETE ------------------------------------------------
  457. echo %date% -- %time%: Startup over, running repeats and refreshing icon cache in 4-9 seconds.
  458. ping 127.0.0.1 > nul
  459. echo -------- 33%% wait time completion --------
  460. ping 127.0.0.1 > nul
  461. echo -------- 66%% wait time completion --------
  462. ping 127.0.0.1 > nul
  463. echo -------- 100%% wait time completion -------
  464. echo.
  465. echo.
  466. echo.
  467.  
  468.  
  469.  
  470.  
  471.  
  472. :C15
  473. ie4uinit.exe -show
  474. set /a count = 0
  475. set /a appten = 0
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487. echo -------------------------------------------- BEGIN REPETITIVE STARTUP --------------------------------------------
  488. echo ----------------- Tasks ----------------
  489. echo -- Windows Defender --
  490. schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /Disable >nul 2>&1
  491. echo %date% -- %time%: Disabled - Windows Defender Cache Maintenance
  492. schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /Disable >nul 2>&1
  493. echo %date% -- %time%: Disabled - Windows Defender Cleanup
  494. schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /Disable >nul 2>&1l
  495. echo %date% -- %time%: Disabled - Windows Defender Scheduled Scan
  496. schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Verification" /Disable >nul 2>&1
  497. echo %date% -- %time%: Disabled - Windows Defender Verification
  498. echo -- SmartScreen [Data Collection] --
  499. schtasks /Change /TN "Microsoft\Windows\AppID\SmartScreenSpecific" /Disable >nul 2>&1
  500. echo %date% -- %time%: Disabled - SmartScreenSpecific
  501. echo -- Error Reporting --
  502. schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable >nul 2>&1
  503. echo %date% -- %time%: Disabled - QueueReporting
  504. echo -- Office --
  505. echo %date% -- %time%: checking for office installations
  506. ping 127.0.0.1 >nul
  507. if exist "C:\Program Files\Microsoft Office\Office10\" goto office_exist
  508. if exist "C:\Program Files (x86)\Microsoft Office\Office10\" goto office_exist
  509. if exist "C:\Program Files\Microsoft Office\Office11\" goto office_exist
  510. if exist "C:\Program Files (x86)\Microsoft Office\Office11\" goto office_exist
  511. if exist "C:\Program Files\Microsoft Office\Office12\" goto office_exist
  512. if exist "C:\Program Files (x86)\Microsoft Office\Office12\" goto office_exist
  513. if exist "C:\Program Files\Microsoft Office\Office14\" goto office_exist
  514. if exist "C:\Program Files (x86)\Microsoft Office\Office14\" goto office_exist
  515. if exist "C:\Program Files\Microsoft Office 14\ClientX64\Root\Office14\" goto office_exist
  516. if exist "C:\Program Files (x86)\Microsoft Office 14\ClientX86\Root\Office14\" goto office_exist
  517. if exist "C:\Program Files\Microsoft Office\Office15\" goto office_exist
  518. if exist "C:\Program Files (x86)\Microsoft Office\Office15\" goto office_exist
  519. if exist "C:\Program Files\Microsoft Office 15\ClientX64\Root\Office15\" goto office_exist
  520. if exist "C:\Program Files (x86)\Microsoft Office 15\ClientX86\Root\Office15\" goto office_exist
  521. if exist "C:\Program Files\Microsoft Office\Office16\" goto office_exist
  522. if exist "C:\Program Files (x86)\Microsoft Office\Office16\" goto office_exist
  523. if exist "C:\Program Files\Microsoft Office 16\ClientX64\Root\Office16\" goto office_exist
  524. if exist "C:\Program Files (x86)\Microsoft Office 16\ClientX86\Root\Office16\" goto office_exist
  525. goto office_nonexist
  526. :office_exist
  527. echo %date% -- %time%: A previous or current office installation has been found, running office tasks
  528. ping 127.0.0.1 >nul
  529. schtasks /Change /TN "Microsoft\Office\Office 15 Subscription Heartbeat" /Disable >nul 2>&1
  530. echo %date% -- %time%: Disabled - Office 15 Subscription Heartbeat
  531. schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack" /Disable >nul 2>&1
  532. echo %date% -- %time%: Disabled - OfficeTelemetryAgentFallBack
  533. schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn" /Disable >nul 2>&1
  534. echo %date% -- %time%: Disabled - OfficeTelemetryAgentLogOn
  535. schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable >nul 2>&1
  536. echo %date% -- %time%: Disabled - Microsoft Compatibility Appraiser
  537. schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable >nul 2>&1
  538. echo %date% -- %time%: Disabled - ProgramDataUpdater
  539. schtasks /Change /TN "Microsoft\Windows\Autochk\Proxy" /Disable >nul 2>&1
  540. echo %date% -- %time%: Disabled - Proxy
  541. schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable >nul 2>&1
  542. echo %date% -- %time%: Disabled - CreateObjectTask
  543. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable >nul 2>&1
  544. echo %date% -- %time%: Disabled - Consolidator
  545. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable >nul 2>&1
  546. echo %date% -- %time%: Disabled - KernelCeipTask
  547. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Uploader" /Disable >nul 2>&1
  548. echo %date% -- %time%: Disabled - Uploader
  549. schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable >nul 2>&1
  550. echo %date% -- %time%: Disabled - UsbCeip
  551. schtasks /Change /TN "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Disable >nul 2>&1
  552. echo %date% -- %time%: Disabled - Microsoft-Windows-DiskDiagnosticDataCollector
  553. schtasks /Change /TN "Microsoft\Windows\Feedback\Siuf\DmClient" /Disable >nul 2>&1
  554. echo %date% -- %time%: Disabled - DmClient
  555. schtasks /Change /TN "Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser" /Disable >nul 2>&1
  556. echo %date% -- %time%: Disabled - MNO Metadata Parser
  557. echo.
  558. echo %date% -- %time%: done!
  559. ping 127.0.0.1 >nul
  560. goto C24
  561. :office_nonexist
  562. echo %date% -- %time%: no office installations found, resuming script
  563. ping 127.0.0.1 >nul
  564. goto C24
  565.  
  566. :C24
  567. echo %date% -- %time%: ending ScpUpdater.exe
  568. taskkill /F /IM ScpUpdater.exe 2>nul
  569. echo %date% -- %time%: done!
  570. echo.
  571. echo --------------------------------------------- END REPETITIVE STARTUP ---------------------------------------------
  572. ping 127.0.0.1 >nul
  573. ping 127.0.0.1 >nul
  574. goto log
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587. :log
  588. cls
  589. echo Created by Serbz ;)
  590. echo.
  591. if %FirstStart%==1 echo A Reboot is recommended. First run of script completed this run.
  592. ::The listener is handling logs now
  593. ::echo ----------------------------------------------------- LOG -----------------------------------------------------
  594. ::type c:\Serbz_Startup\windowsbullshit.log
  595. ::echo.
  596. ::echo.
  597. ::type c:\Serbz_Startup\listener.log
  598. ::echo ---------------------------------------------------------------------------------------------------------------
  599. ::echo.
  600. ::echo.
  601. echo.
  602. goto count%count%
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610. ping 127.0.0.1 >nul
  611. ping 127.0.0.1 >nul
  612. ping 127.0.0.1 >nul
  613. ping 127.0.0.1 >nul
  614. ping 127.0.0.1 >nul
  615. ping 127.0.0.1 >nul
  616. ping 127.0.0.1 >nul
  617. ping 127.0.0.1 >nul
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627. :loop2
  628. set /a count = 1
  629. goto log
  630. :count1
  631. :count0
  632. set serviceString=""
  633. echo --------------------------------------------------- SERVICES ---------------------------------------------------
  634. echo.
  635. net stop bits 2>nul
  636. set serviceString=Background Intelligence Transfer
  637. IF NOT ERRORLEVEL 1 GOTO BitsError
  638. echo %date% -- %time%: %serviceString% Service is not running
  639. :C1
  640. ::echo.
  641. ping 127.0.0.1 >nul
  642. ping 127.0.0.1 >nul
  643. ping 127.0.0.1 >nul
  644. ping 127.0.0.1 >nul
  645. ping 127.0.0.1 >nul
  646. ping 127.0.0.1 >nul
  647. ping 127.0.0.1 >nul
  648.  
  649. net stop wuauserv 2>nul 1>nul
  650. set serviceString=Windows Update
  651. IF NOT ERRORLEVEL 1 GOTO WUError
  652. echo %date% -- %time%: %serviceString% Service is not running
  653. :C2
  654. ::echo.
  655. ping 127.0.0.1 >nul
  656. ping 127.0.0.1 >nul
  657. ping 127.0.0.1 >nul
  658. ping 127.0.0.1 >nul
  659. ping 127.0.0.1 >nul
  660. ping 127.0.0.1 >nul
  661. ping 127.0.0.1 >nul
  662. ping 127.0.0.1 >nul
  663.  
  664. Echo %date% -- %time%: Secondary check for wuauserv
  665. FOR /F "tokens=3" %%A IN ('sc queryex wuauserv ^| findstr PID') DO (SET pid=%%A)
  666. IF "!pid!" NEQ "0" (
  667. taskkill /F /PID !pid!
  668. )
  669. ::Secho done
  670. ::just make it look pretty later
  671. ping 127.0.0.1 >nul
  672.  
  673. Echo %date% -- %time%: SmartScreen Check
  674. FOR /F "tokens=3" %%A IN ('sc queryex smartscreen ^| findstr PID') DO (SET pid=%%A)
  675. IF "!pid!" NEQ "0" (
  676. taskkill /F /PID !pid!
  677. )
  678.  
  679.  
  680. net stop SysMain 2>nul
  681. set serviceString=Superfetch
  682. IF NOT ERRORLEVEL 1 GOTO SysMainError
  683. echo %date% -- %time%: %serviceString% Service is not running
  684. :C3
  685. ::echo.
  686. ping 127.0.0.1 >nul
  687. ping 127.0.0.1 >nul
  688. ping 127.0.0.1 >nul
  689. ping 127.0.0.1 >nul
  690. ping 127.0.0.1 >nul
  691. ping 127.0.0.1 >nul
  692. ping 127.0.0.1 >nul
  693.  
  694.  
  695. net stop dosvc 2>nul
  696. set serviceString=Delivery Optimization
  697. IF NOT ERRORLEVEL 1 GOTO dosvcError
  698. echo %date% -- %time%: %serviceString% Service is not running
  699. :C4
  700. ::echo.
  701. ping 127.0.0.1 >nul
  702. ping 127.0.0.1 >nul
  703. ping 127.0.0.1 >nul
  704. ping 127.0.0.1 >nul
  705. ping 127.0.0.1 >nul
  706. ping 127.0.0.1 >nul
  707. ping 127.0.0.1 >nul
  708. ping 127.0.0.1 >nul
  709. ping 127.0.0.1 >nul
  710.  
  711.  
  712. net stop wersvc 2>nul
  713. set serviceString=Windows Error Reporting
  714. IF NOT ERRORLEVEL 1 GOTO wersvcError
  715. echo %date% -- %time%: %serviceString% Service is not running
  716. :C9
  717. ::echo.
  718. ping 127.0.0.1 >nul
  719. ping 127.0.0.1 >nul
  720. ping 127.0.0.1 >nul
  721. ping 127.0.0.1 >nul
  722. ping 127.0.0.1 >nul
  723. ping 127.0.0.1 >nul
  724. ping 127.0.0.1 >nul
  725. ping 127.0.0.1 >nul
  726. ping 127.0.0.1 >nul
  727.  
  728.  
  729. net stop MapsBroker 2>nul
  730. set serviceString=Maps Broker
  731. IF NOT ERRORLEVEL 1 GOTO MapsBrokerError
  732. echo %date% -- %time%: %serviceString% Service is not running
  733. :C11
  734. ::echo.
  735. ping 127.0.0.1 >nul
  736. ping 127.0.0.1 >nul
  737. ping 127.0.0.1 >nul
  738. ping 127.0.0.1 >nul
  739. ping 127.0.0.1 >nul
  740. ping 127.0.0.1 >nul
  741. ping 127.0.0.1 >nul
  742. ping 127.0.0.1 >nul
  743.  
  744.  
  745. net stop DiagTrack 2>nul
  746. set serviceString=Diagnostics Tracking
  747. IF NOT ERRORLEVEL 1 GOTO DiagTrackError
  748. echo %date% -- %time%: %serviceString% Service is not running
  749. :C14
  750. ::echo.
  751. ping 127.0.0.1 >nul
  752. ping 127.0.0.1 >nul
  753. ping 127.0.0.1 >nul
  754. ping 127.0.0.1 >nul
  755. ping 127.0.0.1 >nul
  756. ping 127.0.0.1 >nul
  757. ping 127.0.0.1 >nul
  758. ping 127.0.0.1 >nul
  759. ping 127.0.0.1 >nul
  760.  
  761.  
  762. net stop dmwappushservice 2>nul
  763. set serviceString=Windows Phones Push
  764. IF NOT ERRORLEVEL 1 GOTO dmwappushserviceError
  765. echo %date% -- %time%: %serviceString% Service is not running
  766. :C15
  767. echo.
  768.  
  769. echo ---------------------------------------------- END SERVICES CHECK ----------------------------------------------
  770. echo.
  771. echo.
  772. ::echo QUICK NETWORK CHECK (Recycling Wait Times)
  773. ::ping 127.0.0.1 >nul
  774.  
  775.  
  776. ::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
  777. ::set /a count = 9
  778. ::goto log
  779. :::count9
  780. ping 127.0.0.1 >nul
  781. ping 127.0.0.1 >nul
  782. ping 127.0.0.1 >nul
  783. ping 127.0.0.1 >nul
  784. ping 127.0.0.1 >nul
  785. ping 127.0.0.1 >nul
  786. ping 127.0.0.1 >nul
  787. ping 127.0.0.1 >nul
  788. ping 127.0.0.1 >nul
  789. ping 127.0.0.1 >nul
  790. ping 127.0.0.1 >nul
  791. ping 127.0.0.1 >nul
  792. ping 127.0.0.1 >nul
  793. ping 127.0.0.1 >nul
  794. ping 127.0.0.1 >nul
  795.  
  796. echo --------------------------------------------------- PROCESSES ---------------------------------------------------
  797. echo.
  798.  
  799. ::echo %date% -- %time%: killing WShelper.exe
  800. taskkill /F /IM WShelper.exe 2>nul
  801. IF ERRORLEVEL 1 goto WShelperError
  802. echo %date% -- %time%: WShelper.exe was running and was stopped
  803. echo. %date% -- %time%: WShelper.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  804. ping 127.0.0.1 > nul
  805. :C5
  806. ::echo.
  807. ping 127.0.0.1 >nul
  808. ping 127.0.0.1 >nul
  809. ping 127.0.0.1 >nul
  810. ping 127.0.0.1 >nul
  811. ping 127.0.0.1 >nul
  812. ping 127.0.0.1 >nul
  813. ping 127.0.0.1 >nul
  814. ping 127.0.0.1 >nul
  815. ping 127.0.0.1 >nul
  816.  
  817.  
  818.  
  819. ::echo %date% -- %time%: Killing MsoSync.exe
  820. taskkill /F /IM msosync.exe 2>nul
  821. IF ERRORLEVEL 1 goto msosyncError
  822. echo %date% -- %time%: MsoSync.exe was running and was stopped
  823. echo. %date% -- %time%: MsoSync.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  824. ping 127.0.0.1 > nul
  825. :C6
  826. ::echo.
  827. ping 127.0.0.1 >nul
  828. ping 127.0.0.1 >nul
  829. ping 127.0.0.1 >nul
  830. ping 127.0.0.1 >nul
  831. ping 127.0.0.1 >nul
  832. ping 127.0.0.1 >nul
  833. ping 127.0.0.1 >nul
  834. ping 127.0.0.1 >nul
  835. ping 127.0.0.1 >nul
  836.  
  837.  
  838.  
  839. ::echo %date% -- %time%: Killing MpCmdRun.exe
  840. taskkill /F /IM MpCmdRun.exe 2>nul
  841. IF ERRORLEVEL 1 goto MpCmdRunError
  842. echo %date% -- %time%: Windows Defender Cleanup Task (MpCmdRun.exe) was running and was stopped
  843. echo. %date% -- %time%: Windows Defender Cleanup Task (MpCmdRun.exe) was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  844. ping 127.0.0.1 > nul
  845. :C7
  846. ::echo.
  847. ping 127.0.0.1 >nul
  848. ping 127.0.0.1 >nul
  849. ping 127.0.0.1 >nul
  850. ping 127.0.0.1 >nul
  851. ping 127.0.0.1 >nul
  852. ping 127.0.0.1 >nul
  853. ping 127.0.0.1 >nul
  854. ping 127.0.0.1 >nul
  855. ping 127.0.0.1 >nul
  856.  
  857.  
  858.  
  859. ::echo %date% -- %time%: Killing Windows10UpgraderApp.exe
  860. taskkill /F /IM Windows10UpgraderApp.exe 2>nul
  861. IF ERRORLEVEL 1 goto Windows10UpgraderAppError
  862. echo %date% -- %time%: Windows 10 Upgrade App was running and was stopped
  863. echo. %date% -- %time%: Windows 10 Upgrade App was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  864. echo Marking directories for removal
  865. set /a appten = 1
  866. ping 127.0.0.1 > nul
  867. :C8
  868. if %appten%==1 goto 10appdir
  869. :C20
  870. ::echo.
  871. ping 127.0.0.1 >nul
  872. ping 127.0.0.1 >nul
  873. ping 127.0.0.1 >nul
  874. ping 127.0.0.1 >nul
  875. ping 127.0.0.1 >nul
  876. ping 127.0.0.1 >nul
  877. ping 127.0.0.1 >nul
  878.  
  879.  
  880. FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq Skype.exe"') DO IF %%x == Skype.exe (
  881. goto SkypeRunning
  882. ) else goto killskype
  883. :SkypeRunning
  884. echo %date% -- %time%: Skype is running, skipping skypehost.exe check.
  885. :C10
  886. ::echo.
  887. ping 127.0.0.1 >nul
  888. ping 127.0.0.1 >nul
  889. ping 127.0.0.1 >nul
  890. ping 127.0.0.1 >nul
  891. ping 127.0.0.1 >nul
  892. ping 127.0.0.1 >nul
  893. ping 127.0.0.1 >nul
  894. ping 127.0.0.1 >nul
  895.  
  896.  
  897. taskkill /F /IM OneDrive.exe 2>nul
  898. IF ERRORLEVEL 1 goto OneDriveError
  899. echo %date% -- %time%: OneDrive.exe was running and was stopped
  900. echo. %date% -- %time%: OneDrive.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  901. goto uninstallOneDrive
  902. :C13
  903. :C12
  904. ping 127.0.0.1 >nul
  905. ping 127.0.0.1 >nul
  906. ping 127.0.0.1 >nul
  907. ping 127.0.0.1 >nul
  908. ping 127.0.0.1 >nul
  909. ping 127.0.0.1 >nul
  910. ping 127.0.0.1 >nul
  911. ping 127.0.0.1 >nul
  912. ping 127.0.0.1 >nul
  913.  
  914.  
  915.  
  916. taskkill /F /IM compattelrunner.exe 2>nul
  917. IF ERRORLEVEL 1 goto compattelrunner_error
  918. echo %date% -- %time%: compattelrunner.exe was running and was stopped
  919. echo. %date% -- %time%: compattelrunner.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  920. :C7261
  921. echo.
  922.  
  923. ping 127.0.0.1 >nul
  924. ping 127.0.0.1 >nul
  925. ping 127.0.0.1 >nul
  926. ping 127.0.0.1 >nul
  927. ping 127.0.0.1 >nul
  928. ping 127.0.0.1 >nul
  929. ping 127.0.0.1 >nul
  930. ping 127.0.0.1 >nul
  931.  
  932. taskkill /F /IM "Adobe Genuine Helper.exe" 2>nul
  933. IF ERRORLEVEL 1 goto Adobe_E
  934. echo %date% -- %time%: Adobe Genuine Helper.exe was running and was stopped
  935. echo. %date% -- %time%: Adobe Genuine Helper.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  936. :C72616
  937. echo.
  938.  
  939.  
  940.  
  941. echo ---------------------------------------------- END PROCESSES CHECK ----------------------------------------------
  942. echo.
  943. echo.
  944. ping 127.0.0.1 >nul
  945. ping 127.0.0.1 >nul
  946. ping 127.0.0.1 >nul
  947. ping 127.0.0.1 >nul
  948. ping 127.0.0.1 >nul
  949. ping 127.0.0.1 >nul
  950. ping 127.0.0.1 >nul
  951. ping 127.0.0.1 >nul
  952. ping 127.0.0.1 >nul
  953. ping 127.0.0.1 >nul
  954. ping 127.0.0.1 >nul
  955. ping 127.0.0.1 >nul
  956. ping 127.0.0.1 >nul
  957. ping 127.0.0.1 >nul
  958. ping 127.0.0.1 >nul
  959. ping 127.0.0.1 >nul
  960. ping 127.0.0.1 >nul
  961. ping 127.0.0.1 >nul
  962.  
  963. ::echo QUICK NETWORK CHECK (Recycling Wait Times)
  964. ping 127.0.0.1 >nul
  965. goto loop2
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981. ::4,6,8,3,5,7,11,10,12 count values still available, max is currently 12
  982.  
  983. ::below are the error returns for services and exe's
  984. ::They are handled differently, idk why, services are if not errorlevel 1 they go here, exe's are if errorlevel 1 they go here...
  985. ::I really don't care.
  986.  
  987. ::BELOW ARE SERVICE/PROCESS RELATED STOPS
  988.  
  989. :dmwappushserviceError
  990. echo %date% -- %time%: %serviceString% was running and was stopped
  991. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  992. sc config dmwappushservice start= disabled
  993. goto C15
  994.  
  995. :DiagTrackError
  996. echo %date% -- %time%: %serviceString% was running and was stopped
  997. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  998. sc config DiagTrack start= disabled
  999. goto C14
  1000.  
  1001. :MapsBrokerError
  1002. echo %date% -- %time%: %serviceString% was running and was stopped
  1003. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1004. sc config MapsBroker start= disabled
  1005. goto C11
  1006.  
  1007. :BitsError
  1008. echo %date% -- %time%: %serviceString% was running and was stopped
  1009. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1010. sc config bits start= disabled
  1011. goto C1
  1012.  
  1013. :WUError
  1014. echo %date% -- %time%: %serviceString% was running and was stopped
  1015. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1016. sc config wuauserv start= disabled
  1017. echo %date% -- %time%: Removing SoftwareDistrobution folder in windows directory
  1018. del /q "C:\Windows\SoftwareDistribution\*"
  1019. FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
  1020. echo.
  1021. goto C2
  1022.  
  1023.  
  1024.  
  1025. :SysMainError
  1026. echo %date% -- %time%: %serviceString% was running and was stopped
  1027. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1028. sc config SysMain start= disabled
  1029. goto C3
  1030.  
  1031. :dosvcError
  1032. echo %date% -- %time%: %serviceString% was running and was stopped
  1033. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1034. sc config dosvc start= disabled
  1035. goto C4
  1036.  
  1037. :wersvcError
  1038. echo %date% -- %time%: %serviceString% was running and was stopped
  1039. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1040. sc config wersvc start= disabled
  1041. goto C9
  1042.  
  1043.  
  1044. ::begin .exe's
  1045.  
  1046. :compattelrunner_error
  1047. echo %date% -- %time%: compattelrunner.exe is not running.
  1048. goto C7261
  1049.  
  1050. :Adobe_E
  1051. echo %date% -- %time%: Adobe Genuine Helper.exe is not running.
  1052. goto C72616
  1053.  
  1054.  
  1055. :WShelperError
  1056. echo %date% -- %time%: WShelper.exe is not running.
  1057. goto C5
  1058.  
  1059. :msosyncError
  1060. echo %date% -- %time%: MsoSync.exe is not running.
  1061. goto C6
  1062.  
  1063. :MpCmdRunError
  1064. echo %date% -- %time%: MpCmdRun.exe is not running.
  1065. goto C7
  1066.  
  1067. :Windows10UpgraderAppError
  1068. echo %date% -- %time%: Windows10UpgraderApp.exe is not running.
  1069. goto C8
  1070.  
  1071. :killskype
  1072. taskkill /F /IM SkypeHost.exe 2>nul
  1073. IF ERRORLEVEL 1 goto SkypeHostError
  1074. echo %date% -- %time%: SkypeHost.exe was running and was stopped
  1075. echo. %date% -- %time%: SkypeHost.exe was running and was stopped >> c:\Serbz_Startup\windowsbullshit.log
  1076. ping 127.0.0.1 > nul
  1077. goto C10
  1078.  
  1079. :SkypeHostError
  1080. echo %date% -- %time%: SkypeHost.exe is not running.
  1081. goto C10
  1082.  
  1083. :OneDriveError
  1084. echo %date% -- %time%: OneDrive.exe is not running.
  1085. goto C12
  1086.  
  1087. :uninstallOneDrive
  1088. echo %date% -- %time%: Attempting to run OneDrive uninstallation
  1089. ping 127.0.0.1 >nul
  1090. reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
  1091. if %OS%==32BIT goto 32bitOneDrive
  1092. if %OS%==64BIT goto 64bitOneDrive
  1093. echo %date% -- %time%: error in OS detection skipping One Drive uninstall
  1094. ping 127.0.0.1 >nul
  1095. goto C12
  1096.  
  1097. :32bitOneDrive
  1098. %SystemRoot%\System32\OneDriveSetup.exe /uninstall
  1099. goto C13
  1100.  
  1101. :64bitOneDrive
  1102. %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
  1103. goto C13
  1104.  
  1105. :10appdir
  1106. echo %date% -- %time%: Removing Windows10Upgrade directory on C:\
  1107. del /q "C:\Windows10Upgrade\*"
  1108. FOR /D %%p IN ("C:\Windows10Upgrade\*.*") DO rmdir "%%p" /s /q
  1109. rmdir C:\Windows10Upgrade
  1110. del /q "C:\Windows\SoftwareDistribution\*"
  1111. FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
  1112. del /q "C:\Windows\UpdateAssistant\*"
  1113. FOR /D %%p IN ("C:\Windows\UpdateAssistant\*.*") DO rmdir "%%p" /s /q
  1114. rmdir C:\Windows\UpdateAssistant
  1115. del /q "C:\Windows\UpdateAssistantV2\*"
  1116. FOR /D %%p IN ("C:\Windows\UpdateAssistantV2\*.*") DO rmdir "%%p" /s /q
  1117. rmdir C:\Windows\UpdateAssistantV2
  1118. del "%UserProfile%\Desktop\Windows 10 Update Assistant.lnk"
  1119. set /a appten = 0
  1120. goto C20
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127. ::BELOW ARE STARTUP RELATED STOPS
  1128.  
  1129. :temp_files_for_startup
  1130. del C:\Serbz_Startup\TempFile*.sv >nul
  1131. del C:\Serbz_Startup\forcedstart_3.temp >nul
  1132. ::del C:\Serbz_Startup\forcedstart_3.temp >nul
  1133. echo 1 >forcedstart_3.temp
  1134. echo One time startup items have been flagged for a new run on this update.
  1135. ping 127.0.0.1 >nul
  1136. goto C25
  1137.  
  1138.  
  1139. :acl_clear
  1140. del c:\serbz_startup\setaclerror.log >nul 1>&2
  1141. echo --------------------------------------------- ONE TIME STARTUP COMPLETE ------------------------------------------------
  1142. echo.
  1143. echo.
  1144. echo finished missing startup item returning to beginning of script
  1145. ping 127.0.0.1 >nul
  1146. goto C30
  1147.  
  1148.  
  1149.  
  1150. :skipstartup
  1151. echo Skipping one time startup!
  1152. echo.
  1153. del c:\Serbz_Startup\skipstartup.log 2>nul
  1154. ping 127.0.0.1 >nul
  1155. goto C15
  1156.  
  1157.  
  1158.  
  1159. ::END SCRIPT!!!
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165. :: below is super old code but still useful somewhere else just not here
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174. echo.
  1175. echo Done! If you would like to add to hosts you can continue to use this box, else close at will.
  1176. echo --------------------------------------------
  1177. echo.
  1178.  
  1179. :loop
  1180. echo.
  1181. set /p input=What's the domain or ip?:
  1182. echo 127.0.0.1 %input% >> c:\windows\system32\drivers\etc\hosts
  1183. goto loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement