It's been a few years since I used a computer that used Windows. I've been using Linux for a while.
However, I do remember a few things about writing a batch script. (REM
for comments, ECHO
to print stuff, etc.) But what I want to do is make a script that runs on Windows 8.1 and likely uses the command prompt or DOS to turn my computer's internal Wi-Fi adapter off then back on because sometimes when it wakes up, the Wi-Fi device doesn't turn on.
Yes, I have all my drivers up to date, but it still happens some times. And when it does happen, I end out having to open the command prompt as an adminstrator, run devmgmt.msc
, scroll down to Network Adapters, select Broadcom 802.11abgn Wireless SDIO Adapter, click on the button that says "Disable" (which is dangerously too close to the button that says "Uninstall"!), sometimes get a prompt telling me that what I'm about to do will shut off my Wi-Fi (which is kind of the point of why I'm clicking the button in the first place), then click the "Enable" button to bring it back up and it works again.
When this happens on Linux, all I have to do run sudo ifdown wlan0 && sudo ifup wlan0
, and I'm done. Heck, I can just add an alias that runs that to ~/.bash_aliases
and be done with it sooner.
What I want to do is make it as easy to fix this problem on Windows as easy as it is to this problem on Linux using a batch script, no Visual Basic (or Visual Studio), no Power Shell. Just Notepad and the Command Prompt.