Help!!!!!
Is there anyone know how to write a batch file to enable / disable local area connection just by 1 click on the batch file??
Thank you so much...
Help!!!!!
Is there anyone know how to write a batch file to enable / disable local area connection just by 1 click on the batch file??
Thank you so much...
You can download a utility from MS called "devcon.exe" from here put the below command to disable and enable my network connection that will list of all hardware ID's for devices:
devcon hwids * > out.txt
For the ethernet cards entry, I got the below entry:
Hardware ID's:
PCI\VEN_1317&DEV_0985&SUBSYS_05741317&REV_11
PCI\VEN_1317&DEV_0985&SUBSYS_05741317
The hardware id was "PCI\VEN_1317"
After that from the command prompt just disable the network connection with the below command:
devcon disable PCI\VEN_1317
It is possible to do that. For that first you will need generate a script file for the same. The commands you will need to add are :
netsh interface set interface "Local Area Connection " ENABLE
netsh interface set interface "Local Area Connection " DISABLE
Copy this command in notepad and save it as bat file. You can create separate script for both. Running the same by double clicking will disable the connection. Try this.
Bookmarks