WizardKit/.bin/Scripts/exit_safemode.ps1
Alan Mason 3031df5a4c 2016-07: Retroactive Updates
* DISM
  * Much safer WinVer check

* Enter / Exit SafeMode
  * Now enables MSI (un)installers in SafeMode w/ Networking

* Final Checklist
  * NEW: can now be run directly from UFD

* Hide Windows 10 Upgrade.reg
  * Added more registry blocks

* Removed Chocolately
  * Too much volatility
  * Ninite will regain default installer status

* Replaced ConEmu with Cmder
  * Cmder has a heavily modified ConEmu
  * Changed background
  * Added Cmder launchers in Misc

* SW Diagnostics
  * NEW: can now be run directly from UFD
  * BleachBit / Winapp2.ini updated
    * Expanded selections
    * Now only checks temp data size; DOES NOT delete temp data
  * Internet connection test will now loop until the manually exited
  * Now warns you that it can't check Windows activation in SafeMode

* Bugfixes
  * reset_browsers.ps1
    * Should skip "resetting" the backup folders (i.e. Default.wkbak)
2017-11-17 00:50:54 -07:00

27 lines
668 B
PowerShell

# WK-Exit SafeMode
## Init ##
$wd = $(Split-Path $MyInvocation.MyCommand.Path)
pushd "$wd"
. .\init.ps1
clear
$host.UI.RawUI.WindowTitle = "WK SafeMode Tool"
# Ask user
if (!(ask "Disable booting to SafeMode?")) {
popd
exit 1
}
## Configure OS ##
# Edit BCD
start -wait "bcdedit" -argumentlist @("/deletevalue", "{current}", "safeboot") -nonewwindow
start -wait "bcdedit" -argumentlist @("/deletevalue", "{default}", "safeboot") -nonewwindow
# Disable MSI access under safemode
Remove-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer" -Recurse 2>&1 | out-null
## Done ##
popd
pause "Press Enter to reboot..."
restart-computer