Fixed
-
"Cancel" option bug:
Selecting option [0] Cancel in Windows Update and DNS menus now correctly returns to the main menu, instead of running code from other options. -
Robust menu logic:
Invalid or blank user input in option menus now triggers a clear error message and re-prompts, instead of exiting or falling through. -
Whitespace trimming:
User input is now stripped of leading/trailing spaces before comparison, preventing accidental menu errors.
Removed/Deprecated
- WMIC dependency eliminated:
All code relying onwmic
for detecting active network adapters (e.g.
wmic nic where "NetEnabled=true" get NetConnectionID ^| findstr /R /V "^$"
) has been removed.
Added/Improved
-
PowerShell-based adapter detection:
Active network adapters are now detected with a PowerShell command:
powershell -Command "Get-NetAdapter | Where-Object { $_.Status -eq 'Up' } | Select-Object -ExpandProperty Name"
ensuring compatibility with all modern Windows 10/11 versions. -
Better error handling:
If no active network adapters are found, user is informed and returned to the menu. -
Maintained language independence:
Detection of network adapters now works regardless of Windows language settings.
Summary
- Menu choices behave as intended and cannot fall through to incorrect actions.
- Adapter detection is future-proof and works everywhere PowerShell is available.
- Input handling is user-friendly and robust against typos and blank inputs.
- All WMIC reliance is gone – script will not break on newer Windows installations.