sunhux
asked on
netsh interface set ...DISABLED error : equivalent to disabling WiFi ?
Q1:
Is
netsh interface set interface "Wireless_Interface_name" disabled
equivalent to physically turning off the Wifi (a light blue Antenna
LED) with Fn-Fn key? Ie will this command turn off the blue LED?
Q2:
There's one EE thread which suggested "devcon ..." command but
I can't find this in my Win XP Professional
Q3:
Need someone to tell me where I went wrong with the command
syntax below :
D:\MRTG>netsh interface show interface
Admin State State Type Interface Name
-------------------------- ---------- ---------- ---------- ---------- -------
Enabled Dedicated VMware Network Adapter VMnet1
Enabled Dedicated Wireless Network Connection
Enabled Dedicated VMware Network Adapter VMnet8
Enabled Dedicated Local Area Connection
Enabled Internal Internal
Enabled Loopback Loopback
D:\MRTG>netsh interface set interface "Wireless Network Connection" DISABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the
correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
D:\MRTG>netsh interface set interface "Wireless Network Connection"
ADMIN=DISABLED
ADMIN=DISABLED is not an acceptable value for admin.
The parameter is incorrect.
D:\MRTG>netsh interface SHOW interface "Wireless Network Connection"
Wireless Network Connection
Type: Dedicated
Administrative state: Enabled
Connect state:
D:\MRTG>netsh interface set interface "Wireless Network Connection" ENABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the
correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
D:\MRTG>netsh interface set interface "Wireless Network Connection" CONNECTED
CONNECTED is not an acceptable value for admin.
The parameter is incorrect.
D:\MRTG>netsh interface set interface "Wireless Network Connection"
connect=CONNECTED
connect=CONNECTED is not an acceptable value for admin.
The parameter is incorrect.
D:\MRTG>netsh interface set interface "Wireless Network Connection" "ENABLED"
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the
correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
Is
netsh interface set interface "Wireless_Interface_name" disabled
equivalent to physically turning off the Wifi (a light blue Antenna
LED) with Fn-Fn key? Ie will this command turn off the blue LED?
Q2:
There's one EE thread which suggested "devcon ..." command but
I can't find this in my Win XP Professional
Q3:
Need someone to tell me where I went wrong with the command
syntax below :
D:\MRTG>netsh interface show interface
Admin State State Type Interface Name
--------------------------
Enabled Dedicated VMware Network Adapter VMnet1
Enabled Dedicated Wireless Network Connection
Enabled Dedicated VMware Network Adapter VMnet8
Enabled Dedicated Local Area Connection
Enabled Internal Internal
Enabled Loopback Loopback
D:\MRTG>netsh interface set interface "Wireless Network Connection" DISABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the
correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
D:\MRTG>netsh interface set interface "Wireless Network Connection"
ADMIN=DISABLED
ADMIN=DISABLED is not an acceptable value for admin.
The parameter is incorrect.
D:\MRTG>netsh interface SHOW interface "Wireless Network Connection"
Wireless Network Connection
Type: Dedicated
Administrative state: Enabled
Connect state:
D:\MRTG>netsh interface set interface "Wireless Network Connection" ENABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the
correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
D:\MRTG>netsh interface set interface "Wireless Network Connection" CONNECTED
CONNECTED is not an acceptable value for admin.
The parameter is incorrect.
D:\MRTG>netsh interface set interface "Wireless Network Connection"
connect=CONNECTED
connect=CONNECTED is not an acceptable value for admin.
The parameter is incorrect.
D:\MRTG>netsh interface set interface "Wireless Network Connection" "ENABLED"
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the
correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
q1 - it's disabling a coonection, like option "disable" in connections center, not your LED =)
q2 - http://support.microsoft.com/kb/311272
q3 - netsh interface set interface "VMware Network Adapter VMnet1" admin=enabled - checked twice - all work fine
q2 - http://support.microsoft.com/kb/311272
q3 - netsh interface set interface "VMware Network Adapter VMnet1" admin=enabled - checked twice - all work fine
ASKER
Hi Firew0lf,
is the last word "Disable" or "Disabled" : the help screen indicated it as "Disabled"
Hi FellFreeDom,
I'm not sure why my VMWare NIC appeared twice : how is this related to the WiFi
/ wireless NIC that I'm trying to disable ?
"DISABLE"
Disabled is a property (read)
Disable is a method (write)
Hope this helps
Disabled is a property (read)
Disable is a method (write)
Hope this helps
ASKER
I've just tried out Firew0lf's suggestion of using "Disable" & with exact case but no joy :
D:\shareware>netsh interface set interface "Wireless Network Connection" Disab
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct syntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
D:\shareware>netsh interface set interface "Wireless Network Connection" admin=Disable
admin=Disable is not an acceptable value for admin.
The parameter is incorrect.
ASKER
Hi FellFreeDom,
For devcon, what's the exact command syntax to disable & enable my Wireless NIC?
Below is the output from find command :
D:\devcon\>devcon find * | find/I "wireless"
PCI\VEN_8086&DEV_4227&SUBS
eless 3945ABG Network Connection
ROOT\DNI_DNEMP\0001 : Intel(R) PRO/Wirel
ess 3945ABG Network Connection - Deterministic Network Enhancer Miniport
ROOT\LGL_TVTPKTFILTERMP\00
ess 3945ABG Network Connection - TVT Packet Filter Miniport
ROOT\MS_PSCHEDMP\0002 : Intel(R) PRO/Wirel
ess 3945ABG Network Connection - Packet Scheduler Miniport
ROOT\TM_CFWMP\0000 : Intel(R) PRO/Wirel
ess 3945ABG Network Connection - Trend Micro Common Firewall Miniport
I'm not sure why my VMWare NIC appeared twice : how is this related to the WiFiI've wrote a correct command for disabling wired NIC, let's try to disable wifi nic:
/ wireless NIC that I'm trying to disable ?
I've renamed my "wireless connection 2" to "WiFi" and wrote a command:
netsh interface set interface "WiFi" admin=disabled - interface goes down.
netsh interface set interface "WiFi" admin=enabled - interface is up.
btw about two vmware nics - first for NAT and second for Host-Only - you can check this out at VmWare Virtual Network Editor =)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Still no joy from my end despite I've renamed by Wireless NIC to "WirelessNIC" :
C:\>netsh interface show interface | find/i "wireles"
Enabled Dedicated WirelessNIC
C:\>netsh interface set interface "WirelessNIC" admin=disabled
admin=disabled is not an acceptable value for admin.
The parameter is incorrect.
C:\>netsh interface set interface "WirelessNIC" admin=DISABLED
admin=DISABLED is not an acceptable value for admin.
The parameter is incorrect.
C:\>netsh interface set interface "WirelessNIC" DISABLED
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
C:\>netsh interface set interface "WirelessNIC" DISABLE
One or more essential parameters not specified
The syntax supplied for this command is not valid. Check help for the correct sy
ntax.
Usage set interface [name = ] IfName
[ [admin = ] ENABLED|DISABLED
[connect = ] CONNECTED|DISCONNECTED
[newname = ] NewName ]
Sets interface parameters.
IfName - the name of the interface
admin - whether the interface should be enabled (non-LAN only).
connect - whether to connect the interface (non-LAN only).
newname - new name for the interface (LAN only).
Notes:
- At least one option other than the name must be specified.
- If connect = CONNECTED is specified, then the interface
is automatically enabled even if the admin = DISABLED
option is specified.
C:\>netsh interface set interface "WirelessNIC" admin=DISCONNECTED
admin=DISCONNECTED is not an acceptable value for admin.
The parameter is incorrect.
C:\>netsh interface set interface "WirelessNIC" admin="DISABLED"
admin=DISABLED is not an acceptable value for admin.
The parameter is incorrect.
C:\>netsh interface set interface "WirelessNIC" admin="DISABLE"
admin=DISABLE is not an acceptable value for admin.
The parameter is incorrect.
ASKER
I read about devcon & tried disabling only
PCI\VEN_8086&DEV_4227&SUBS
but it appears to be disabling several device & still continuing before I Ctrl-C to break it
ASKER
ok
Hi, I know that this is old thread but maybe this information will still be valuable after all those years for everyone reading it. As for answering Q3 I had the exact same problem with accepting the "correct" command syntax by Netsh (Netshell). As I really wanted to use Netsh in my batch files to control my interfaces,
I have gone to great lengths and tried many, many different combinations of guessing the "proper" syntax and as well as those as OP and others and guess what did I do to solve this issue? Well, at one moment I just thought...Maybe replacing Netshell helper dll files will do the trick? So I sourced all the needed helper dll files from Windows Server 2003 Service Pack 2 (5.2.3790.3959.srv03_sp2_r tm.070216- 1710) and replaced them one by one in my currently installed OS (Windows XP 5.1.2600.2180.xpsp_sp2_rtm .040803-21 58) while observing what happens with the Netsh command I tried to ad nauseam...And...Finally! It started to work!
The command "netsh interface set interface "Local Area Connection" enabled" or "netsh interface set interface "Local Area Connection" disabled" now works a treat to enable or disable my interfaces. It can also work with with "enable" or "disable" without a letter "d" at the end of the word. And it seems the culplrit was... the "ifmon.dll" helper dll... So you can try to replace this very dll file and see if the issue is solved.
Oddly, the command (ignore interface name here because it is checked later by Netsh once it takes accepted "enable" parameter after it) suggested by FellFreeDom: "netsh interface set interface "VMware Network Adapter VMnet1" admin=enabled" was still giving me: "the parameter is incorrect", so it is not even checking if the interface name exist at all... Well, it perhaps depends on these Netsh dll helper file versions...But hey! At least I made it working with just the two commands without any additional prefix of "admin=" "connect=" etc.
I have gone to great lengths and tried many, many different combinations of guessing the "proper" syntax and as well as those as OP and others and guess what did I do to solve this issue? Well, at one moment I just thought...Maybe replacing Netshell helper dll files will do the trick? So I sourced all the needed helper dll files from Windows Server 2003 Service Pack 2 (5.2.3790.3959.srv03_sp2_r
The command "netsh interface set interface "Local Area Connection" enabled" or "netsh interface set interface "Local Area Connection" disabled" now works a treat to enable or disable my interfaces. It can also work with with "enable" or "disable" without a letter "d" at the end of the word. And it seems the culplrit was... the "ifmon.dll" helper dll... So you can try to replace this very dll file and see if the issue is solved.
Oddly, the command (ignore interface name here because it is checked later by Netsh once it takes accepted "enable" parameter after it) suggested by FellFreeDom: "netsh interface set interface "VMware Network Adapter VMnet1" admin=enabled" was still giving me: "the parameter is incorrect", so it is not even checking if the interface name exist at all... Well, it perhaps depends on these Netsh dll helper file versions...But hey! At least I made it working with just the two commands without any additional prefix of "admin=" "connect=" etc.
netsh interface set interface "Wireless Network Connection" Disable