New
#21
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
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
- Change the code to the path you use for the batch file's shortcutCode:Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\Tools\PathToWhereverYouHaveStuckIt\MaintainInternetConnection.lnk" & Chr(34), 0 Set WshShell = Nothing
- You still need to set the shortcut's Properties, Advanced to Run as Admin
Denis
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
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
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
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
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 - - -
Yep, I run:
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 meCode:nircmdc.exe loop 172800 500 setsysvolume 65536 default_record