How to automate resetting the adapter?

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 11,327
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #21

    Matthew,

    Dave's query has nothing to do with elevation.

    Denis
      My Computer


  2. Posts : 17
    Windows 10
       #22

    Try3 said:
    Matthew,

    Dave's query has nothing to do with elevation.

    Denis
    Hey... just wanted to say thank you for the script. It works awesomely!

    By the way, do you by any chance know if there is any way to 'hide' it from the taskbar?

    I've tried the following solutions:
    How to run .BAT files invisibly, without displaying the Command Prompt window
    https://nircmd.nirsoft.net/win.html
    • AHK's hide

    But couldn't get any of them to work... works fine for all other scripts I have though, that run in CMD
      My Computer


  3. Posts : 11,327
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #23

    Dave,

    I just run it from a shortcut that I've set to run it minimised. I don't see the point in hiding it since it only takes a moment to run after you've used the shortcut. I never hide any of my scripts, I set them all to run minimised with a chosen icon so I can see them on the Taskbar and know what is happening.

    You could start it by using a vbs file that set it to run hidden.

    StartIt.vbs
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\Tools\PathToWhereverYouHaveStuckIt\MaintainInternetConnection.lnk" & Chr(34), 0
    Set WshShell = Nothing
    - Change the code to the path you use for the batch file's shortcut
    - You still need to set the shortcut's Properties, Advanced to Run as Admin


    Denis
      My Computer


  4. Posts : 11,327
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #24

    Dave,

    If you are going to experiment with using the Task scheduler then see my guide
    Make Task scheduler run a batch file minimised and with a specific icon - TenForums
    - I explain how to make them run hidden in para 4.2
    - Every other step of the procedure remains the same whether it's for minimised or hidden running

    Denis
      My Computer


  5. Posts : 17
    Windows 10
       #25

    Try3 said:
    Dave,

    I just run it from a shortcut that I've set to run it minimised. I don't see the point in hiding it since it only takes a moment to run after you've used the shortcut. I never hide any of my scripts, I set them all to run minimised with a chosen icon so I can see them on the Taskbar and know what is happening.

    You could start it by using a vbs file that set it to run hidden.

    StartIt.vbs
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\Tools\PathToWhereverYouHaveStuckIt\MaintainInternetConnection.lnk" & Chr(34), 0
    Set WshShell = Nothing
    - Change the code to the path you use for the batch file's shortcut
    - You still need to set the shortcut's Properties, Advanced to Run as Admin


    Denis
    Thank you for your reply! I've tried this particular .vbs script, as mentioned in How to run .BAT files invisibly, without displaying the Command Prompt window, but unfortunately, it still shows up in the taskbar...
      My Computer


  6. Posts : 11,327
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #26

    Dave290 said:
    Thank you for your reply! I've tried this particular .vbs script, as mentioned in How to run .BAT files invisibly, without displaying the Command Prompt window, but unfortunately, it still shows up in the taskbar...
    Dave,

    I do not know what is making it appear in your taskbar. I have just run this vbs file to call up a batch file and it runs hidden.

    I'm stumped

    We are both talking about running the vbs to run the lnk shortcut to the batch file I posted in my post #9 of this thread?
    - I've just downloaded that and used the vbscript file to run it and no icon appears in the Taskbar.

    Denis
      My Computer


  7. Posts : 17
    Windows 10
       #27

    Try3 said:
    Dave,

    I do not know what is making it appear in your taskbar. I have just run this vbs file to call up a batch file and it runs hidden.

    I'm stumped

    We are both talking about running the vbs to run the lnk shortcut to the batch file I posted in my post #9 of this thread?
    - I've just downloaded that and used the vbscript file to run it and no icon appears in the Taskbar.

    Denis
    >We are both talking about running the vbs to run the lnk shortcut to the batch file I posted in my post #9 of this thread?

    Yep. Yeah, I've tried running the VBS with both the shortcut and the main batch file... strange indeed.
      My Computer


  8. Posts : 11,327
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #28

    Dave,

    1 Whilst not connected to the visible in Taskbar issue, a diagram you posted concerns me.
    - I wrote the script for somebody who had told me his WiFi adapter name was "Wi-Fi 2" but your posted diagram seems to show that yours is different.
    - Please would you the correct name of your wifi card as shown in Network & sharing centre, Change adapter settings.

    2 I wrote that script for somebody who suffered from his network adapter tripping out every so often so he wanted continual connection testing.
    - People in other circumstances have wanted a different approach.
    - For my own case, one computer of mine failed to switch its network adapter back on after sleep/hibernation so I omitted the internet connection test altogether and just went straight for disabling then re-enabling the network adapter.
    - What is your need for this script? Continual internet connection testing or just a simple reset?

    Denis
      My Computer


  9. Posts : 11,327
    Windows 10 Home x64 Version 21H2 Build 19044.1706
       #29

    Dave,

    Is the visible in Taskbar issue just affecting this script or all your scripts?
    - I think you have already said that it's just this one but I wanted to check.
    - There isn't anything particularly out of the ordinary about this script apart from the powershell call.

    Denis
      My Computer


  10. Posts : 17
    Windows 10
       #30

    Try3 said:
    Dave,

    1 Whilst not connected to the visible in Taskbar issue, a diagram you posted concerns me.
    - I wrote the script for somebody who had told me his WiFi adapter name was "Wi-Fi 2" but your posted diagram seems to show that yours is different.
    - Please would you the correct name of your wifi card as shown in Network & sharing centre, Change adapter settings.

    2 I wrote that script for somebody who suffered from his network adapter tripping out every so often so he wanted continual connection testing.
    - People in other circumstances have wanted a different approach.
    - For my own case, one computer of mine failed to switch its network adapter back on after sleep/hibernation so I omitted the internet connection test altogether and just went straight for disabling then re-enabling the network adapter.
    - What is your need for this script? Continual internet connection testing or just a simple reset?

    Denis
    1. Hm, is this really necessary though? I've removed the 2 from "Wi-Fi 2", and confirmed that it works for me just fine...

    2. Yeah, I have the same issue as the poster basically. Occasionally my internet goes out, where resetting the adapter does the trick.


    - - - Updated - - -

    Try3 said:
    Dave,

    Is the visible in Taskbar issue just affecting this script or all your scripts?
    - I think you have already said that it's just this one but I wanted to check.
    - There isn't anything particularly out of the ordinary about this script apart from the powershell call.

    Denis
    Yep, I run:
    Code:
    nircmdc.exe loop 172800 500 setsysvolume 65536 default_record
    From a batch file, which gets hidden just fine. The script, or command rather, makes sure that the microphone volume of a default 'Recording' device, is always at a 100, as Windows always lowers it automatically for me
      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 00:40.
Find Us




Windows 10 Forums