How Create a Shortcut to Reset My Wireless Adapter in Windows 10


  1. Posts : 2
    Windows 10
       #1

    How Create a Shortcut to Reset My Wireless Adapter in Windows 10


    My wireless adapter can't seem to run longer than 30 minutes without needing to be reset. I'm guessing I need to update the driver or get a new card, but before that it would sure be nice to be able to directly reset the adapter without having to run the troubleshooter program. Running Win 10 Ver 2004.
      My Computer


  2. Posts : 16,956
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #2

    This batch file momentarily turns the adapter off and then turns it back on. This was the 'reset' that worked for me when I had a badly-behaved adapter a while back.

    Run this batch file as Admin - right-click on it & you'll see the option.
    - When you are happy with it you should store it somewhere secure. My attitude is quite strict - see Set up my Tools folder ditty - TenForums
    - When you have stuck it somewhere secure, you can make a shortcut to it that includes the Run as Admin setting. That's makes it much more convenient.
    Create the shortcut using any of the normal methods [such as right-click, Create shortcut],
    right-click, Properties,
    Advanced,
    Run as Admin,
    OK,
    OK.

    DisableEnableWiFiCard.zip

    DisableEnableWiFiCard.bat
    Code:
    :: The WiFi must be turned on first
    prompt $g
    Set /a Found=0
    set FindString=Name
    Set UseExpresssion=netsh wlan show interfaces 
    for /F "tokens=*" %%X IN ('%UseExpresssion%  ^|   find /i "%FindString%"') do Call :Interfaces "%%X"
    GoTo EndGetWiFi
    :Interfaces
    Set ThisLine=%~1
    Set AdapterName=%ThisLine:*: =%
    GoTo :EOF
    :EndGetWiFi
    :: Do the disabling-enabling
    netsh interface set interface "%AdapterName%" disabled
    netsh interface set interface "%AdapterName%" enabled
    ::Pause to check outcome

    Denis
      My Computer


  3. Posts : 2
    Windows 10
    Thread Starter
       #3

    Run as Admin


    Thanks Denis for offering to help. The shortcut creating advanced properties window won't let me check the "run as admin" box. How do I make that happen?
      My Computer


  4. Posts : 7,607
    Windows 10 Home 20H2
       #4

    Create an elevated shortcut to run the batch script.

    How to Add Create Elevated Shortcut to New Context Menu in Windows 10

    It works with .exe, .cmd, and .bat files.
      My Computer


  5. Posts : 16,956
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #5

    abritc said:
    Thanks Denis for offering to help. The shortcut creating advanced properties window won't let me check the "run as admin" box. How do I make that happen?
    1 Does the batch file do what you wanted?

    2.1 Here is a DisableEnableWiFiCardShortcut.zip for you. Put it on your Desktop, unzip it, right-click on it, select Properties, type in the Target path to wherever you have put the batch file.
    2.2 The problem with your own shortcut rings a vague bell from years ago but I don't have any notes to hand about solving it. Perhaps you could put off considering it further until after the current tool is workgin for you.

    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:33.
Find Us




Windows 10 Forums