safetycar wrote: ↑07 Oct 2022, 09:53
I meant launching cmd.exe from windows. If you open the start menu and start typing "cmd.exe" you should see the program, you can right click it and open as administrator, (a permission that you were already trying to use with "runas*").
And there introducing the middle part that was intended to be run there:
netsh interface set interface name="Ethernet" admin=disabled
And the other similar one with the "enabled" flag
Thanks, indeed the issue seems to be with netsh. Looks like a windows update broke the command.
- netsh interface show
--- lists the interfaces and validates that my interface is indeed Ethernet
- netsh interface set interface name="Ethernet" admin=disabled,,hide
--- says: disabled,,hide is not an acceptable value for admin.
- netsh interface set interface name="Ethernet" admin=disabled
--- says: The system cannot find the file specified.
Since I am running this in an Administrator: Command Prompt, and it "used to" run fine, the only explanation that I can come up with is that netsh syntax has changed making the script no longer valid.