Create a shortcut from Context Menu item and insert it in the Taskbar

sally_91

Distinguished
Dec 22, 2012
82
0
18,630
Hello,

I was wondering how to create a shortcut to a context menu(right-click) item
and then place it on the taskbar at the bottom of the screen or as a toolbar.


When I google this all I find are ways to create a new context menu item but never to extract an existing item.


Basically I'm trying to save myself the 4 step process of disabling and enabling my internet connection. Sounds lazy, I know. But it would be neat and convenient if this was possible.

I guess I was inspired by the Amazon Dash Button.

If someone can order a box of detergent with the click of a button, why would this be unreasonable?

 
you can create a .bat file that runs the commands for disabling and enabling the hardware that connects your PC to internet (ie. ethernet or wifi)
If you tell me what you use to connect to internet (wifi or ethernet) I can give you a .bat script for this and you can just keep it wherever you want on your PC and create a shortcut to it on the taskbar
 
Okay awesome!

Would this be the same thing as clicking the drop-up button in the task bar and clicking on the internet access icon, clicking the network name, and then clicking on connect/disconnect?


What information do you need?
I usually use Wifi but will be using a wired connection in the near future.
 
most anything you do with clicking something can be done manually through the command prompt.
a .bat (batch) file is a text document that has a basic set of instructions that simply says to open the command prompt and run the specified command.

for disabling you internet open notepad and copy/paste the following:

@ECHO OFF
ipconfig /release

then save this file in a folder and title the folder whatever you want but make the file named Internet OFF or something
EX: file name: WiFi OFF.bat / file type: all
make sure to select file type as all and not a text document.

Then make another one with the following change:

@ECHO OFF
ipconfig /renew

this second one will be what turns your internet back on.

there is no way that I know of to make a shortcut to these types of files in the taskbar. you're going to just have to have them on you desktop and click them from there.

Please note that this does not disable your wifi or ethernet card. it simply disconnects you from internet access

Also, when on wifi in windows 10 you just simply need to click the signal bar icon in the corner of the task bar and click the wifi on/off switch. but these batch files will simplify to the same degree when connected via ethernet.
 



OK great thanks a lot


I was able to add the folder that the .bat files were in to the taskbar.
You just need to right click the task bar and go to toolbars then select ...New Toolbar.

Then unlock the taskbar and drag the new toolbar to the left so both .bat files are readily visible.

Now I'm just wondering how to hide the .bat extension for that folder so it looks more spiffy.

yay