diff --git a/library/GeneralFunctions.psm1 b/library/GeneralFunctions.psm1 index 1b930dc..16950e9 100644 --- a/library/GeneralFunctions.psm1 +++ b/library/GeneralFunctions.psm1 @@ -31,8 +31,8 @@ function Info { Write-Output "- Disable ShellExperienceHost" Write-Output "- Disable SearchUI `n" Write-Output "Things that break (or doesn't work on) Windows 11 (will be fixed):" - Write-Output "- Disabling telemetry (Disables updates. See #7) `n`n" - Write-Output "- Remove user folders under This PC" + Write-Output "- Disabling telemetry (Disables updates. See #7)" + Write-Output "- Remove user folders under This PC `n`n" Read-Host "Press Enter to continue" } @@ -60,3 +60,35 @@ function InstallHyperV { } else { Install-WindowsFeature -Name "Hyper-V" -IncludeManagementTools -WarningAction SilentlyContinue } } + +function MSDOSMode { + Write-Output '"MS-DOS Mode" for Windows 10 (PoC, made by Endermanch)' + Write-Output "This is provided WITHOUT WARRANTY OF ANY KIND and is only a Proof of Concept." + Write-Output "Big thanks to Endermanch for this and his discovery of the BCPE exploit. `n`n" + + $conflocation = "$env:APPDATA\WindowsToolbox\" + $windowsdos = "https://dl.malwarewatch.org/multipurpose/Windows10DOS.zip" + + Write-Output "Downloading" + Invoke-WebRequest -Uri $windowsdos -OutFile $conflocation\Windows10DOS.zip + + Write-Output "Installing 7Zip4PowerShell (sorry, Expand-Archive does not support passwords)" + Install-Module 7Zip4PowerShell -Scope CurrentUser -Force -Verbose + Clear-Host + Write-Output "Extracting..." + Expand-7Zip -ArchiveFileName $conflocation\Windows10DOS.zip -TargetPath $conflocation -Password "mysubsarethebest" -Verbose + + Write-Output "Copying to System32" + Copy-Item $conflocation\msdos.bat -Destination "C:\Windows\System32" -Force + Copy-Item $conflocation\win.bat -Destination "C:\Windows\System32" -Force + Copy-Item $conflocation\reboot.bat -Destination "C:\Windows\System32" -Force + + Write-Output "Removing leftovers" + Remove-Item -Path $conflocation\msdos.bat -Force + Remove-Item -Path $conflocation\win.bat -Force + Remove-Item -Path $conflocation\reboot.bat -Force + + Write-Output "Please use WinXEditor to add the entry to the Win+X menu" + Start-Process $conflocation\WinXEditor\WinXEditor.exe + Read-Host "Done" +} diff --git a/main.ps1 b/main.ps1 index d60ca81..b70ad14 100644 --- a/main.ps1 +++ b/main.ps1 @@ -46,7 +46,7 @@ if ( $reply -match "[yY]" ) { Clear-Host -if ($build -lt "10.0.10240") { +if ($build -eq "10.0.10240") { Read-Host "Sorry, your Windows version is not supported, and never will be :( . Press Enter to exit" Exit } elseif ($build -le "10.0.17134") { @@ -239,7 +239,8 @@ $objects = @{ '7-Zip', 'WinDynamicDesktop', 'PowerToys', - 'Internet Download Manager' + 'Internet Download Manager', + 'MS-DOS Mode for Windows 10 (Proof of Concept, made by Endermanch)' )" } } @@ -718,6 +719,10 @@ while ($true) { } } + 'MS-DOS Mode for Windows 10 (Proof of Concept, made by Endermanch)' { + MSDOSMode + } + #Tweaks #System tweaks