Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.19 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. ::Enable line below if you want the script to start minimized
  45. ::if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min "%~dpnx0" %* && exit
  46. Title Fuck Windows, and Fuck Microsoft
  47. color 0C
  48.  
  49. echo --------------------------------------------------- STARTUP ---------------------------------------------------
  50.  
  51.  
  52. echo.
  53. echo.
  54. :setaclplz
  55. echo %date% -- %time%: Checking for SetACL.exe on C:\
  56. ping 127.0.0.1 >nul
  57. if exist C:\SetACL.exe (
  58. echo.
  59. echo SetACL.exe found on C:\
  60. echo.
  61. echo Running Stop Forced Restart on Update Script using SetACL.exe on C:\
  62. goto StopForcedRestart
  63. ) else goto GetSetACL
  64. :GetSetACL
  65. echo SetACL not found, downloading from nemoportal.com FTP
  66. ping 127.0.0.1 >nul
  67. del C:\SetACL.ftp 1>nul 2>nul
  68. echo.open nemoportal.com>> C:\SetACL.ftp
  69. echo.SetACL>> C:\SetACL.ftp
  70. echo.setacl>> C:\SetACL.ftp
  71. echo.lcd c:\>> C:\SetACL.ftp
  72. echo.binary>> C:\SetACL.ftp
  73. echo.get SetACL.exe>> C:\SetACL.ftp
  74. echo.disconnect>> C:\SetACL.ftp
  75. echo.quit>> C:\SetACL.ftp
  76. ftp -s:C:\SetACL.ftp
  77. del C:\SetACL.ftp >nul
  78. ping 127.0.0.1 >nul
  79. echo.
  80. echo SetACL.exe Downloaded to C:\ Successfully!
  81. echo.
  82. echo.
  83. echo Running Stop Forced Restart on Update Script using SetACL.exe on C:\
  84. ping 127.0.0.1 >nul
  85. goto StopForcedRestart
  86.  
  87.  
  88.  
  89.  
  90. :StopForcedRestart
  91. echo.
  92. echo.
  93. ping 127.0.0.1 >nul
  94. for /f "delims= " %%a in ('"wmic useraccount where name='%username%' get sid"') do (
  95. if not "%%a"=="SID" (
  96. set myvar=%%a
  97. goto :ForcedRestart_Loop_End
  98. )
  99. )
  100.  
  101. :ForcedRestart_Loop_End
  102. set "line01=<?xml version="1.0" encoding="UTF-16"?>"
  103. set "line02=<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">"
  104. set "line03= <RegistrationInfo>"
  105. set "line04= <URI>\Microsoft\Windows\UpdateOrchestrator\Reboot</URI>"
  106. set "line05= </RegistrationInfo>"
  107. set "line06= <Triggers>"
  108. set "line07= <TimeTrigger>"
  109. set "line08= <StartBoundary>2016-09-14T00:20:38+02:00</StartBoundary>"
  110. set "line09= <Enabled>true</Enabled>"
  111. set "line10= </TimeTrigger>"
  112. set "line11= </Triggers>"
  113. set "line12= <Principals>"
  114. set "line13= <Principal id="Author">"
  115. set "line14= <UserId>S-1-5-18</UserId>"
  116. set "line15= <RunLevel>LeastPrivilege</RunLevel>"
  117. set "line16= </Principal>"
  118. set "line17= </Principals>"
  119. set "line18= <Settings>"
  120. set "line19= <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>"
  121. set "line20= <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>"
  122. set "line21= <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>"
  123. set "line22= <AllowHardTerminate>true</AllowHardTerminate>"
  124. set "line23= <StartWhenAvailable>true</StartWhenAvailable>"
  125. set "line24= <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>"
  126. set "line25= <IdleSettings>"
  127. set "line26= <Duration>PT10M</Duration>"
  128. set "line27= <WaitTimeout>PT1H</WaitTimeout>"
  129. set "line28= <StopOnIdleEnd>true</StopOnIdleEnd>"
  130. set "line29= <RestartOnIdle>false</RestartOnIdle>"
  131. set "line30= </IdleSettings>"
  132. set "line31= <AllowStartOnDemand>true</AllowStartOnDemand>"
  133. set "line32= <Enabled>false</Enabled>"
  134. set "line33= <Hidden>false</Hidden>"
  135. set "line34= <RunOnlyIfIdle>false</RunOnlyIfIdle>"
  136. set "line35= <WakeToRun>true</WakeToRun>"
  137. set "line36= <ExecutionTimeLimit>PT72H</ExecutionTimeLimit>"
  138. set "line37= <Priority>7</Priority>"
  139. set "line38= <RestartOnFailure>"
  140. set "line39= <Interval>PT10M</Interval>"
  141. set "line40= <Count>3</Count>"
  142. set "line41= </RestartOnFailure>"
  143. set "line42= </Settings>"
  144. set "line43= <Actions Context="Author">"
  145. set "line44= <Exec>"
  146. set "line45= <Command>%systemroot%\system32\MusNotification.exe</Command>"
  147. set "line46= <Arguments>RebootDialog</Arguments>"
  148. set "line47= </Exec>"
  149. set "line48= </Actions>"
  150. set "line49=</Task>"
  151. setlocal EnableDelayedExpansion
  152. (
  153. echo !line01!
  154. echo !line02!
  155. echo !line03!
  156. echo !line04!
  157. echo !line05!
  158. echo !line06!
  159. echo !line07!
  160. echo !line08!
  161. echo !line09!
  162. echo !line10!
  163. echo !line11!
  164. echo !line12!
  165. echo !line13!
  166. echo !line14!
  167. echo !line15!
  168. echo !line16!
  169. echo !line17!
  170. echo !line18!
  171. echo !line19!
  172. echo !line20!
  173. echo !line21!
  174. echo !line22!
  175. echo !line23!
  176. echo !line24!
  177. echo !line25!
  178. echo !line26!
  179. echo !line27!
  180. echo !line28!
  181. echo !line29!
  182. echo !line30!
  183. echo !line31!
  184. echo !line32!
  185. echo !line33!
  186. echo !line34!
  187. echo !line35!
  188. echo !line36!
  189. echo !line37!
  190. echo !line38!
  191. echo !line39!
  192. echo !line40!
  193. echo !line41!
  194. echo !line42!
  195. echo !line43!
  196. echo !line44!
  197. echo !line45!
  198. echo !line46!
  199. echo !line47!
  200. echo !line48!
  201. echo !line49!
  202. ) > "Win 10 Reboot deaktivieren.xml"
  203. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setprot -op "dacl:p_nc;sacl:p_nc" >nul
  204. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
  205. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
  206. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:System;p:read" >nul
  207. schtasks /delete /F /tn "Microsoft\Windows\UpdateOrchestrator\Reboot"
  208. schtasks /create /tn "Microsoft\Windows\UpdateOrchestrator\Reboot" /xml "%~dp0Win 10 Reboot deaktivieren.xml"
  209. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setprot -op "dacl:p_nc;sacl:p_nc" >nul
  210. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn setowner -ownr "n:%USERNAME%" >nul
  211. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:%USERNAME%;p:full" >nul
  212. "C:\SetACL.exe" -on C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot -ot file -actn ace -ace "n:System;p:read" >nul
  213. del /F /Q "%~dp0Win 10 Reboot deaktivieren.xml"
  214. echo ACL Processes complete!
  215. echo.
  216. echo.
  217. ping 127.0.0.1 >nul
  218. echo %date% -- %time%: One time adding reg key for windows defender for this session.
  219. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f >nul
  220. echo HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\DisableAntiSpyware = 0
  221. echo.
  222. ping 127.0.0.1 >nul
  223. echo %date% -- %time%: Running UAC registry values
  224. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f >nul
  225. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorAdmin = 0
  226. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableLUA /t REG_DWORD /d 0 /f >nul
  227. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA = 0
  228. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ConsentPromptBehaviorUser /t REG_DWORD /d 0 /f >nul
  229. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ConsentPromptBehaviorUser = 0
  230. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DSCAutomationHostEnabled /t REG_DWORD /d 2 /f >nul
  231. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\C\DSCAutomationHostEnabled = 2
  232. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableCursorSuppression /t REG_DWORD /d 1 /f >nul
  233. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableCursorSuppression = 1
  234. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableInstallerDetection /t REG_DWORD /d 1 /f >nul
  235. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableInstallerDetection = 1
  236. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableSecureUIAPaths /t REG_DWORD /d 1 /f >nul
  237. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableSecureUIAPaths = 1
  238. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableUIADesktopToggle /t REG_DWORD /d 0 /f >nul
  239. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableUIADesktopToggle = 0
  240. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v EnableVirtualization /t REG_DWORD /d 1 /f >nul
  241. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableVirtualization = 1
  242. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f >nul
  243. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\PromptOnSecureDesktop = 0
  244. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v ValidateAdminCodeSignatures /t REG_DWORD /d 0 /f >nul
  245. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ValidateAdminCodeSignatures = 0
  246. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v dontdisplaylastusername /t REG_DWORD /d 0 /f >nul
  247. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\dontdisplaylastusername = 0
  248. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v scforceoption /t REG_DWORD /d 0 /f >nul
  249. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\scforceoption = 0
  250. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v shutdownwithoutlogon /t REG_DWORD /d 1 /f >nul
  251. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\shutdownwithoutlogon = 1
  252. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v undockwithoutlogon /t REG_DWORD /d 1 /f >nul
  253. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\undockwithoutlogon = 1
  254. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v FilterAdministratorToken /t REG_DWORD /d 0 /f >nul
  255. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\FilterAdministratorToken = 0
  256. ping 127.0.0.1 >nul
  257. echo.
  258. echo.
  259. echo %date% -- %time%: Adding the see through taskbar registry value for fun
  260. Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v UseOLEDTaskbarTransparency /t REG_DWORD /d 1 /f >nul
  261. echo HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\UseOLEDTaskbarTransparency = 1
  262. ping 127.0.0.1 >nul
  263. echo.
  264. echo.
  265. echo %date% -- %time%: Setting reg keys for Windows Diagnostics Tracking/Windows Phones Push/Telemetry Services
  266. reg add HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener\ /v Start /t REG_DWORD /d 0 /f >nul
  267. echo HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener\Start = 0
  268. reg add HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\ /v AllowTelemetry /t REG_DWORD /d 0 /f >nul
  269. echo HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection\AllowTelemetry = 0
  270. reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility\ /v DiagnosticErrorText /t REG_DWORD /d 0 /f >nul
  271. echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Visibility\DiagnosticErrorText = 0
  272. reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\ /v DiagnosticErrorText /t REG_SZ /d "" /f >nul
  273. echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\DiagnosticErrorText = A Nil Value
  274. reg add HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\ /v DiagnosticLinkText /t REG_SZ /d "" /f >nul
  275. echo HKLM\SOFTWARE\Microsoft\WindowsSelfHost\UI\Strings\DiagnosticLinkText = A Nil Value
  276. ping 127.0.0.1 >nul
  277. echo.
  278. echo.
  279. echo %date% -- %time%: Removing SoftwareDistrobution folder in windows directory
  280. del /q "C:\Windows\SoftwareDistribution\*"
  281. FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
  282. ping 127.0.0.1 >nul
  283. echo.
  284. echo.
  285. echo %date% -- %time%: Removing Windows10Upgrade directory on C:\
  286. del /q "C:\Windows10Upgrade\*"
  287. FOR /D %%p IN ("C:\Windows10Upgrade\*.*") DO rmdir "%%p" /s /q
  288. rmdir C:\Windows10Upgrade
  289. ping 127.0.0.1 >nul
  290. echo.
  291. echo.
  292. echo %date% -- %time%: Removing Unnecessary Windows 10 Apps
  293. PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dp0\z3.ps1""' -Verb RunAs}"
  294. ping 127.0.0.1 >nul
  295. echo.
  296. echo.
  297.  
  298.  
  299. ping 127.0.0.1 >nul
  300. echo --------------------------------------------- STARTUP COMPLETE ------------------------------------------------
  301. echo %date% -- %time%: Startup over, running repeats and refreshing icon cache in 4-9 seconds.
  302. ping 127.0.0.1 > nul
  303. echo -------- 33%% wait time completion --------
  304. ping 127.0.0.1 > nul
  305. echo -------- 66%% wait time completion --------
  306. ping 127.0.0.1 > nul
  307. echo -------- 100%% wait time completion -------
  308. echo.
  309. echo.
  310. echo.
  311.  
  312.  
  313.  
  314. ie4uinit.exe -show
  315. set /a count = 0
  316.  
  317. :log
  318. cls
  319. echo Created by Serbz ;)
  320. echo.
  321. echo ----------------------------------------------------- LOG -----------------------------------------------------
  322. type c:\windowsbullshit.log
  323. echo ---------------------------------------------------------------------------------------------------------------
  324. echo.
  325. echo.
  326. echo.
  327. goto count%count%
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337. :loop2
  338. :count0
  339. set serviceString=""
  340. echo.
  341. ping 127.0.0.1 > nul
  342.  
  343. set /a count = 1
  344. goto log
  345. :count1
  346. echo --------------------------------------------------- SERVICES ---------------------------------------------------
  347. echo.
  348. net stop bits 2>nul
  349. set serviceString=Background Intelligence Transfer
  350. IF NOT ERRORLEVEL 1 GOTO BitsError
  351. echo %date% -- %time%: %serviceString% Service is not running
  352. :C1
  353. echo.
  354.  
  355. net stop wuauserv 2>nul 1>nul
  356. set serviceString=Windows Update
  357. IF NOT ERRORLEVEL 1 GOTO WUError
  358. echo %date% -- %time%: %serviceString% Service is not running
  359. :C2
  360. echo.
  361.  
  362. net stop SysMain 2>nul
  363. set serviceString=Superfetch
  364. IF NOT ERRORLEVEL 1 GOTO SysMainError
  365. echo %date% -- %time%: %serviceString% Service is not running
  366. :C3
  367. echo.
  368.  
  369. net stop dosvc 2>nul
  370. set serviceString=Delivery Optimization
  371. IF NOT ERRORLEVEL 1 GOTO dosvcError
  372. echo %date% -- %time%: %serviceString% Service is not running
  373. :C4
  374. echo.
  375.  
  376. net stop wersvc 2>nul
  377. set serviceString=Windows Error Reporting
  378. IF NOT ERRORLEVEL 1 GOTO wersvcError
  379. echo %date% -- %time%: %serviceString% Service is not running
  380. :C9
  381. echo.
  382.  
  383. net stop MapsBroker 2>nul
  384. set serviceString=Maps Broker
  385. IF NOT ERRORLEVEL 1 GOTO MapsBrokerError
  386. echo %date% -- %time%: %serviceString% Service is not running
  387. :C11
  388. echo.
  389.  
  390. net stop DiagTrack 2>nul
  391. set serviceString=Diagnostics Tracking
  392. IF NOT ERRORLEVEL 1 GOTO DiagTrackError
  393. echo %date% -- %time%: %serviceString% Service is not running
  394. :C14
  395. echo.
  396.  
  397. net stop dmwappushservice 2>nul
  398. set serviceString=Windows Phones Push
  399. IF NOT ERRORLEVEL 1 GOTO dmwappushserviceError
  400. echo %date% -- %time%: %serviceString% Service is not running
  401. :C15
  402. echo.
  403.  
  404. echo ---------------------------------------------- END SERVICES CHECK ----------------------------------------------
  405. ping 127.0.0.1 > nul
  406.  
  407. set /a count = 9
  408. goto log
  409. :count9
  410.  
  411. echo --------------------------------------------------- PROCESSES ---------------------------------------------------
  412. echo.
  413.  
  414. ::echo %date% -- %time%: killing WShelper.exe
  415. taskkill /F /IM WShelper.exe 2>nul
  416. IF ERRORLEVEL 1 goto WShelperError
  417. echo %date% -- %time%: WShelper.exe was running and was stopped
  418. echo. %date% -- %time%: WShelper.exe was running and was stopped >> C:\WindowsBullshit.log
  419. ping 127.0.0.1 > nul
  420. :C5
  421. echo.
  422.  
  423. ::echo %date% -- %time%: Killing MsoSync.exe
  424. taskkill /F /IM msosync.exe 2>nul
  425. IF ERRORLEVEL 1 goto msosyncError
  426. echo %date% -- %time%: MsoSync.exe was running and was stopped
  427. echo. %date% -- %time%: MsoSync.exe was running and was stopped >> C:\WindowsBullshit.log
  428. ping 127.0.0.1 > nul
  429. :C6
  430. echo.
  431.  
  432. ::echo %date% -- %time%: Killing MpCmdRun.exe
  433. taskkill /F /IM MpCmdRun.exe 2>nul
  434. IF ERRORLEVEL 1 goto MpCmdRunError
  435. echo %date% -- %time%: Windows Defender Cleanup Task (MpCmdRun.exe) was running and was stopped
  436. echo. %date% -- %time%: Windows Defender Cleanup Task (MpCmdRun.exe) was running and was stopped >> C:\WindowsBullshit.log
  437. ping 127.0.0.1 > nul
  438. :C7
  439. echo.
  440.  
  441. ::echo %date% -- %time%: Killing Windows10UpgraderApp.exe
  442. taskkill /F /IM Windows10UpgraderApp.exe 2>nul
  443. IF ERRORLEVEL 1 goto Windows10UpgraderAppError
  444. echo %date% -- %time%: Windows 10 Upgrade App was running and was stopped
  445. echo. %date% -- %time%: Windows 10 Upgrade App was running and was stopped >> C:\WindowsBullshit.log
  446. echo %date% -- %time%: Removing Windows10Upgrade directory on C:\
  447. del /q "C:\Windows10Upgrade\*"
  448. FOR /D %%p IN ("C:\Windows10Upgrade\*.*") DO rmdir "%%p" /s /q
  449. rmdir C:\Windows10Upgrade
  450. ping 127.0.0.1 > nul
  451. :C8
  452. echo.
  453.  
  454. FOR /F %%x IN ('tasklist /NH /FI "IMAGENAME eq Skype.exe"') DO IF %%x == Skype.exe (
  455. goto SkypeRunning
  456. ) else goto killskype
  457. :SkypeRunning
  458. echo %date% -- %time%: Skype is running, skipping skypehost.exe check.
  459. :C10
  460. echo.
  461.  
  462. taskkill /F /IM OneDrive.exe 2>nul
  463. IF ERRORLEVEL 1 goto OneDriveError
  464. echo %date% -- %time%: OneDrive.exe was running and was stopped
  465. echo. %date% -- %time%: OneDrive.exe was running and was stopped >> C:\WindowsBullshit.log
  466. goto uninstallOneDrive
  467. :C13
  468. ping 127.0.0.1 > nul
  469. :C12
  470. echo.
  471.  
  472. echo ---------------------------------------------- END PROCESSES CHECK ----------------------------------------------
  473. ping 127.0.0.1 > nul
  474.  
  475.  
  476.  
  477. set /a count = 2
  478. goto log
  479. :count2
  480. echo -------------------------------------------------- PROCESS LIST -------------------------------------------------
  481. del c:\tasklisttitle.log
  482. del c:\tasklistimage.log
  483. TASKLIST /v /fo list |find /i "window title" |find /v "N/A" >> c:\tasklisttitle.log
  484. TASKLIST /v /fo list |find /i "image name" |find /v "N/A" >> c:\tasklistimage.log
  485. type c:\tasklisttitle.log
  486. echo -----------------------------------------------------------------------------------------------------------------
  487. ping 127.0.0.1 > nul
  488. set /a count = 3
  489. goto log
  490. :count3
  491. ::echo.
  492. ::echo.
  493. ::echo QUICK NETWORK CHECK
  494. ::ping 8.8.8.8
  495. goto loop2
  496.  
  497.  
  498. ::4,6,8,3,5,7,11,10,12 count values still available, max is currently 12
  499.  
  500. ::below are the error returns for services and exe's
  501. ::They are handled differently, idk why, services are if not errorlevel 1 they go here, exe's are if errorlevel 1 they go here...
  502. ::I really don't care.
  503.  
  504. ::begin services
  505.  
  506. :dmwappushserviceError
  507. echo %date% -- %time%: %serviceString% was running and was stopped
  508. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  509. sc config dmwappushservice start= disabled
  510. goto C15
  511.  
  512. :DiagTrackError
  513. echo %date% -- %time%: %serviceString% was running and was stopped
  514. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  515. sc config DiagTrack start= disabled
  516. goto C14
  517.  
  518. :MapsBrokerError
  519. echo %date% -- %time%: %serviceString% was running and was stopped
  520. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  521. sc config MapsBroker start= disabled
  522. goto C11
  523.  
  524. :BitsError
  525. echo %date% -- %time%: %serviceString% was running and was stopped
  526. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  527. sc config bits start= disabled
  528. goto C1
  529.  
  530. :WUError
  531. echo %date% -- %time%: %serviceString% was running and was stopped
  532. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  533. sc config wuauserv start= disabled
  534. echo %date% -- %time%: Removing SoftwareDistrobution folder in windows directory
  535. del /q "C:\Windows\SoftwareDistribution\*"
  536. FOR /D %%p IN ("C:\Windows\SoftwareDistribution\*.*") DO rmdir "%%p" /s /q
  537. echo.
  538. goto C2
  539.  
  540. :SysMainError
  541. echo %date% -- %time%: %serviceString% was running and was stopped
  542. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  543. sc config SysMain start= disabled
  544. goto C3
  545.  
  546. :dosvcError
  547. echo %date% -- %time%: %serviceString% was running and was stopped
  548. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  549. sc config dosvc start= disabled
  550. goto C4
  551.  
  552. :wersvc
  553. echo %date% -- %time%: %serviceString% was running and was stopped
  554. echo. %date% -- %time%: %serviceString% Service was running and was stopped >> C:\WindowsBullshit.log
  555. sc config wersvc start= disabled
  556. goto C9
  557.  
  558.  
  559. ::begin .exe's
  560.  
  561.  
  562. :WShelperError
  563. echo %date% -- %time%: WShelper.exe is not running.
  564. goto C5
  565.  
  566. :msosyncError
  567. echo %date% -- %time%: MsoSync.exe is not running.
  568. goto C6
  569.  
  570. :MpCmdRunError
  571. echo %date% -- %time%: MpCmdRun.exe is not running.
  572. goto C7
  573.  
  574. :Windows10UpgraderAppError
  575. echo %date% -- %time%: Windows10UpgraderApp.exe is not running.
  576. goto C8
  577.  
  578. :killskype
  579. taskkill /F /IM SkypeHost.exe 2>nul
  580. IF ERRORLEVEL 1 goto SkypeHostError
  581. echo %date% -- %time%: SkypeHost.exe was running and was stopped
  582. echo. %date% -- %time%: SkypeHost.exe was running and was stopped >> C:\WindowsBullshit.log
  583. ping 127.0.0.1 > nul
  584. goto C10
  585.  
  586. :SkypeHostError
  587. echo %date% -- %time%: SkypeHost.exe is not running.
  588. goto C10
  589.  
  590. :OneDriveError
  591. echo %date% -- %time%: OneDrive.exe is not running.
  592. goto C12
  593.  
  594. :uninstallOneDrive
  595. echo %date% -- %time%: Attempting to run OneDrive uninstallation
  596. ping 127.0.0.1 >nul
  597. reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
  598. if %OS%==32BIT goto 32bitOneDrive
  599. if %OS%==64BIT goto 64bitOneDrive
  600. echo %date% -- %time%: error in OS detection skipping One Drive uninstall
  601. ping 127.0.0.1 >nul
  602. goto C12
  603.  
  604. :32bitOneDrive
  605. %SystemRoot%\System32\OneDriveSetup.exe /uninstall
  606. goto C13
  607.  
  608. :64bitOneDrive
  609. %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
  610. goto C13
  611.  
  612. ::END SCRIPT!!!
  613.  
  614.  
  615.  
  616.  
  617.  
  618. :: below is super old code but still useful somewhere else just not here
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627. echo.
  628. echo Done! If you would like to add to hosts you can continue to use this box, else close at will.
  629. echo --------------------------------------------
  630. echo.
  631.  
  632. :loop
  633. echo.
  634. set /p input=What's the domain or ip?:
  635. echo 127.0.0.1 %input% >> c:\windows\system32\drivers\etc\hosts
  636. goto loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement