Hello @Dienow3xw ,
I read your post, and it sounds like you've been dealing with the standard safe mode loop. You might be able to achieve what you're looking for by using a batch script that combines a PowerShell command for the Wi-Fi radio and the bcdedit /bootsequence flag for a one-time boot.
This approach creates a temporary boot copy, sets it to safe mode, and tells the boot manager to use it only for the very next restart. Once you restart from safe mode, it should naturally revert to your normal Windows boot.
I suggest trying the following .bat script. Note that it will request Administrator privileges since bcdedit requires them.
@echo off
:: Check for Administrator privileges
NET SESSION >nul 2>&1
if %errorLevel% neq 0 (
powershell -Command "Start-Process '%~dpnx0' -Verb RunAs"
exit /b
)
:: 1. Attempt to disable Wi-Fi radio (similar to using the taskbar toggle)
powershell -Command "Get-NetAdapterRadio | Where-Object { $_.RadioType -eq 'WiFi' } | Set-NetAdapterRadio -WiFiState Off"
:: 2. Create a temporary boot entry for Safe Mode
for /f "tokens=3" %%a in ('bcdedit /copy {current} /d "One-Time Safe Mode"') do set TEMPGUID=%%a
:: 3. Try to set the new entry to safe mode and configure it for a one-time boot sequence
if defined TEMPGUID (
bcdedit /set %TEMPGUID% safeboot minimal >nul
bcdedit /bootsequence %TEMPGUID% >nul
echo It looks like the setup was successful. You should enter Safe Mode on the next restart.
) else (
echo I couldn't create the boot entry. You may want to check your bcdedit configuration.
)
pause
For reference, I recommend checking out these official documentation pages:
- Windows.Devices.Radios.Radio Class: Microsoft Learn | Radio Class
- bcdedit /bootsequence: Microsoft Learn | BCDEdit /bootsequence
Please testing this updated version on a secondary machine first, just to verify it safely handles both the radio state and the reboot cycle in your specific environment. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.
Thank you.