diff --git a/Windows-Scripts/windows-repair (# Edit conflict 2026-06-13 qmijxxC #).ps1 b/Windows-Scripts/windows-repair (# Edit conflict 2026-06-13 qmijxxC #).ps1 new file mode 100644 index 0000000..b2dd3b6 --- /dev/null +++ b/Windows-Scripts/windows-repair (# Edit conflict 2026-06-13 qmijxxC #).ps1 @@ -0,0 +1,143 @@ +# Usage: +# Open PowerShell as Administrator +# win+x +# alt+a +# alt+y +# Run: +# In admin powershell Terminal: +# iwr -UseBasicParsing -Uri "https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1?nocache=$(Get-Random)" -OutFile "$env:TEMP\windows-repair-temp.ps1"; powershell -ExecutionPolicy Bypass -File "$env:TEMP\windows-repair-temp.ps1" +# or maybe +# iwr https://git.thecoven.info/PrincessPi/general-scripts-and-system-ssssssetup/raw/branch/main/Windows-Scripts/windows-repair.ps1 | iex + +# check if hasadmin rights, if notm run script in new terminal, clopsing old +## if not, carry on +if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S-1-5-32-544')) { + # launch tghis script int new window after promopting for admin + Start-Process -FilePath 'powershell' -Verb RunAs -ArgumentList "-ExecutionPolicy Bypass -File $PSCommandPath" + + # CLOSE previous terminal + exit 0 +} else { + clear # clear window + + Write-Host -ForegroundColor Magenta @' + .. ..... + ....------.. + ..:--------.. ....... + ..----------.. ....---.. + ...---------=------::....:----:.. + ..-----=+**************=-----:... + .----+****************=-----... + .--=****************=-----=**+:::--:.... + .-=#*********##**++=---====++**+-----:. + ..:==********#=.+@%-==++===++===++*=----... + .:=::******%%+-::=++====+==++====+**=--... + .:+..+*****--@===-:-%--====-=+====+*#=:.. + .-=.-****#=.#+===--=+===----======+*+.. + .:=:+****#@#+=====-**-----*+====++**:. + .. .=****=--======-..%-----%+==++***+-.. + ..=++***+-.----======..*-----#+==+***#%#+.. + .. .:-..---=====--------=-+==+**-@*. ............::::::.... + ..=:..--===+-:-------*%+==*+#%**=. .....:-------------------------:. + ..............-:..--===+-..:-------+==+==.:... ...:----------------------------::. + ......:----------::=:...--==+--:.:-------+==+=:.... ....--------------------------:..... + ..:::----------------=-::.:--===---:.:------=--:.... ...:---------------------------... + ..:------------------=--:..:--=+=--------::.:+-..... ...------------------------------.. + ...:-----------------:....----==-------:...=%*.......:::--------------------------------:.. + ...--------------:+......---------------:+%%#.----------------------------:.......-----:.. + .:----===-------:-.. .:--------------*%%%%=--------------========------:.......-------:... + ..-:.:------------....-.=---------=#%%%%##%------------=-----------------------------------.. + .:--:....:--------:##*=:.-------=#%%%%%%#%+-----------=-------------------------------------: + ..:-----------------::*%%#-------=###%%%%##=--------------------------------------:............ + ..:-------------------:.-#%%##+==+%%%%%%#%+------------------------...:::--------------::::::.. +...:----------------------..-#%#%%%%%%%%*+#%=-------------------------=-:....:----------------:... +--------------------------:.-#%%%%%%%%+#@%%%--------------------------=++=-::---------------:... +---------------------------...+%%%%%%%#%%%%#---------------------------------------------:.... +............------.....----:....-#%%%%%%%*=------------------------------::+=---------....... + ..:-... ....-----.. ....-=-------------------------------------.=*+=....... + ..---:....:-----:.......:--------------------------:-------------==+=-...... + .:-------------..........:---------------------------..:-------------==.......... + ..-------------:... ...--------:...----------------....:-----------==-........... + ..:----==------:..-.... ..--------:...:---------------.....:----------=+-..... + ..------==+=++==-..+--:. .:--------.....-----------=*%=.. ..----------=+=...... + ....------------........:... ..:--------.....-------+#%%#@%.. ...----------=+=...... +....---------===:............... .:----=+*#=. ..--+#**+%@@@#%+. ..:-:..=----=*=:..... +:............:=::+=:--:=.=-.::=... ..*@*-+%@@@:.....-@@#%@*#@@@#%:.. ..-:..---:-#**+-......... +.. ...::::....::-.:.::-.. ..*%:..*@@@*.. ..-%#%@@+%@@@@=.. ...::.=#=..-%*++=:... ... + ...... .......... ..**...*#=*%:. .-*#@%+#%@@@@+... ..*%@%+...+%+=*+=-... + ..*#:.-#+..+-. ..-*#**%%*%@@%=.. ..-%@@*:..+@%=:+**+=:.. + ..*@#*%%=..==. .-*%@#%@##@@@#-. ...#@@%*-=%@@#:..-=++=- + .:#@*-:++..==. .=#%@%*@@*%*=+*:....:.+@*::+%@@@%=......-* + .-%+...=%##%-. .+@*@%*%@##*-:*+..:-==*@=..:#@+:=*:....... + .:*#:..:*@@@%:. .-%@*%@#*%*#=..-%-....:+#=-.:#%-.:+-....... + .+@#=.-*@@@@*.. ....-%@@@@@@=..+%*.. .-%--=+#%-.:*-. .... + .-=++++++++=... .:***+++==::::... .-%#=-*#%#**#-. + .............. +'@ + + Write-Host "`nFIXING WINDOWS FULL PRINCESS PI STYLE (THIS WILL TAKE MANY HOURS AND REBOOT MORE THAN ONCE, SLOWLY)`n" -ForegroundColor Magenta + + Write-Host "ABORTING ANY SCHEDULED SHUTDOWN 1/17" + shutdown.exe /a > $null 2> $null # cmd abort scheduled shutdowns + + Write-Host "GENERATING AND DISPLAYING COMPREHENSIVE STABILITY REPORT 2/17" + Start-Process "perfmon.exe" -ArgumentList "/report" -Wait + + Write-Host "GENERATING AND DISPLAYING STABILITY HISTORY REPORT 3/17" + Start-Process "perfmon.exe" -ArgumentList "/rel" -Wait + + Write-Host "CLEARING DNS 4/17" + ipconfig.exe /flushsdns > $null + + Write-Host "CLEARING ARP CACHE 5/17" + Remove-NetNeighbor -Confirm:$false > $null 2> $null + + Write-Host "CLEARING ALL SAMBA CREDENTIALS 6/17" + net.exe use * /delete /y > $null 2> $null # nuke all samba creds + + Write-Host "RELEASING AND RENEWING DHCP 7/17" + # release and renew dhcp + ipconfig.exe /release > $null + ipconfig.exe /renew > $null + + Write-Host "GETTING CONTROL OF WINDOWS UPDATE" + Install-Module -Name PSWindowsUpdate -Force > $null 2> $null + + + Import-Module PSWindowsUpdate + + Write-Host "UPDATING MALWARE SIGNATURES 8/17" + Update-MpSignature # update windows defender malware siggs + + Write-Host "RUNNING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT, MAY TAKE A LONG TIME, WONT SHOW STATUS) 9/17" + Start-Process -FilePath "MRT.exe" -ArgumentList "/F:Y /Q" -Wait # do full microsoft malicious software removal scan in background automatically removing anything found, wait to proceed + + Write-Host "UPDATING MALWARE SIGNATURES (AGAIN) 10/17" + Update-MpSignature # update windows defender malware siggs + + Write-Host "RUNNING FULL WINDOWS DEFENDER SCAN 11/17" + Start-MpScan -ScanType FullScan # full windows defender scan + + Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP 12/17" + DISM.exe /Online /Cleanup-Image /RestoreHealth # online check for bad files + + Write-Host "RUNNING SYSTEM FILE CHECKER (SFC) 13/17" + SFC.exe /scannow # older check for bad files + + Write-Host "SCHEDULING ESSENTIAL FILE CHECK ON NEXT BOOT 14/17" + SFC.exe /scanonce # check essential files on next boot + + Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK) 15/17" + echo y | chkdsk.exe /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive via y ffuckery) + + Write-Host "SCHEDULINMG OFFLINE MEMTEST 16/17" + mdsched.exe /s # schedule offline memtest (noninteractive) + + Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY 17/17" + Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot + + Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n" + shutdown.exe /r /t (60*5) # shutdown in 5 minutes as failsafe + + Write-Host "`nDONEsiez :3~`n" +} \ No newline at end of file diff --git a/Windows-Scripts/windows-repair.ps1 b/Windows-Scripts/windows-repair.ps1 index 47f20fb..0e57740 100644 --- a/Windows-Scripts/windows-repair.ps1 +++ b/Windows-Scripts/windows-repair.ps1 @@ -77,57 +77,64 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S Write-Host "`nFIXING WINDOWS FULL PRINCESS PI STYLE (THIS WILL TAKE MANY HOURS AND REBOOT MORE THAN ONCE, SLOWLY)`n" -ForegroundColor Magenta - Write-Host "ABORTING ANY SCHEDULED SHUTDOWN 1/17" + Write-Host "ABORTING ANY SCHEDULED SHUTDOWN 1/19" shutdown.exe /a > $null 2> $null # cmd abort scheduled shutdowns - Write-Host "GENERATING AND DISPLAYING COMPREHENSIVE STABILITY REPORT 2/17" + Write-Host "GENERATING AND DISPLAYING COMPREHENSIVE STABILITY REPORT 2/19" Start-Process "perfmon.exe" -ArgumentList "/report" -Wait - Write-Host "GENERATING AND DISPLAYING STABILITY HISTORY REPORT 3/17" + Write-Host "GENERATING AND DISPLAYING STABILITY HISTORY REPORT 3/19" Start-Process "perfmon.exe" -ArgumentList "/rel" -Wait - - Write-Host "CLEARING DNS 4/17" + + Write-Host "CLEARING DNS 4/19" ipconfig.exe /flushsdns > $null - Write-Host "CLEARING ARP CACHE 5/17" + Write-Host "CLEARING ARP CACHE 5/19" Remove-NetNeighbor -Confirm:$false > $null 2> $null - Write-Host "CLEARING ALL SAMBA CREDENTIALS 6/17" + Write-Host "CLEARING ALL SAMBA CREDENTIALS 6/19" net.exe use * /delete /y > $null 2> $null # nuke all samba creds - Write-Host "RELEASING AND RENEWING DHCP 7/17" + Write-Host "RELEASING AND RENEWING DHCP 7/19" # release and renew dhcp ipconfig.exe /release > $null ipconfig.exe /renew > $null - Write-Host "UPDATING MALWARE SIGNATURES 8/17" + Write-Host "GETTING CONTROL OF WINDOWS UPDATE 8/19" + Install-Module -Name PSWindowsUpdate -Force > $null 2> $null + Import-Module PSWindowsUpdate + + Write-Host "UPDATING WINDOWS 9/19" + Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot + + Write-Host "UPDATING MALWARE SIGNATURES 10/19" Update-MpSignature # update windows defender malware siggs - Write-Host "RUNNING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT, MAY TAKE A LONG TIME, WONT SHOW STATUS) 9/17" - Start-Process -FilePath "MRT.exe" -ArgumentList "/F:Y /Q" -Wait # do full microsoft malicious software removal scan in background automatically removing anything found, wait to proceed + # Write-Host "RUNNING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT, MAY TAKE A LONG TIME, WONT SHOW STATUS) 11/19" + # Start-Process -FilePath "MRT.exe" -ArgumentList "/F:Y /Q" -Wait # do full microsoft malicious software removal scan in background automatically removing anything found, wait to proceed - Write-Host "UPDATING MALWARE SIGNATURES (AGAIN) 10/17" + Write-Host "UPDATING MALWARE SIGNATURES (AGAIN) 12/19" Update-MpSignature # update windows defender malware siggs - Write-Host "RUNNING FULL WINDOWS DEFENDER SCAN 11/17" + Write-Host "RUNNING FULL WINDOWS DEFENDER SCAN 13/19" Start-MpScan -ScanType FullScan # full windows defender scan - Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP 12/17" + Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP 14/19" DISM.exe /Online /Cleanup-Image /RestoreHealth # online check for bad files - Write-Host "RUNNING SYSTEM FILE CHECKER (SFC) 13/17" + Write-Host "RUNNING SYSTEM FILE CHECKER (SFC) 15/19" SFC.exe /scannow # older check for bad files - Write-Host "SCHEDULING ESSENTIAL FILE CHECK ON NEXT BOOT 14/17" + Write-Host "SCHEDULING ESSENTIAL FILE CHECK ON NEXT BOOT 16/19" SFC.exe /scanonce # check essential files on next boot - Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK) 15/17" + Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK) 17/19" echo y | chkdsk.exe /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive via y ffuckery) - Write-Host "SCHEDULINMG OFFLINE MEMTEST 16/17" + Write-Host "SCHEDULINMG OFFLINE MEMTEST 18/19" mdsched.exe /s # schedule offline memtest (noninteractive) - Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY 17/17" + Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDLY 19/19" Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n"