2014-04-03 15:18:54 +0000 2014-04-03 15:18:54 +0000
7
7
Advertisement

HP EliteBookでイーサネット接続が検出された場合、ワイヤレスを無効にする

Advertisement

私の会社では最近、以前使っていたレノボのThinkPadに代わってHPのElitebookを社員に配り始めました。

イーサネット接続が行われたことを検出したときにワイヤレスを無効にする方法を見つけようとしています。

私のThinkPadでは、Access Connectionsにアクセスして新しい場所を作成し、「LAN接続が検出されたときにワイヤレスを無効にする」というボックスを選択するだけの簡単な方法でしたが、私のEliteBookでは、HPの同等のもの(HP Connection Manager)では、そのオプションが表示されません。

何か見落としがあるのでしょうか?

Advertisement
Advertisement

回答 (6)

10
10
10
2014-04-07 21:42:59 +0000

正しい接続を使用しているかどうかだけを気にしているのであれば、Windowsは理論的には最も低いメトリック値の接続を好むはずです。ほとんどの場合、これは有線接続になります。しかし、有線接続が100Mbitsで無線接続が54Mbitsの場合、両者は同じメトリック値を受け取ることになります。

有線接続を強制的に優先度を高くするには、以下の手順を実行します ソース , 似たような質問 ) (何も言っていませんが、Windows 7か8をお使いだと思います):

  1. 「ネットワークと共有センター」を開きます。一番簡単なのは、時計の横にある「ネットワーク」アイコンを右クリックすることです。ワイヤレスの信号強度バーのようなものか、パソコンの横にケーブルがあるような形になります。
  2. 左の欄にある「アダプタ設定の変更」をクリックします。
  3. メニューバーの「詳細設定」をクリックし、「詳細設定…」をクリックします。メニューバーが表示されない場合は、キーボードのALTキーを押して表示させます。
  4. 利用可能なネットワークアダプタのリストで、有線アダプタをクリックし、矢印を使ってリストの一番上に移動します。

実際にバッテリーの消費電力を節約するためにアダプタ自体をオフにしたい場合は、ソース)を使用することができるいくつかのオプションがあります。

  • 有線接続が検出されたときにワイヤレスのオン/オフを切り替える「スケジュールされたタスク」を設定することができます。

  • IntelliAdmin には ブログ記事 があり、必要なことを正確に行う VBScript が記述されています。その記事の一番下にあるリンクからダウンロードできます。netswitch.dat “をダウンロードし、"netswitch.vbs "にリネームします。スタートメニューに「

」のショートカットを入れてください。このような方法で使用するとLenovoのEULAに違反する可能性があるため、ダウンロードするためのリンクは掲載していません。ライセンスを読んで、自分が準拠していると判断した場合は、上記の私のソースにダウンロードリンクがあります。

7
7
7
2014-04-11 19:46:46 +0000

HP EliteBookノートパソコンには、イーサネットケーブルが差し込まれたときにワイヤレス接続を無効にする機能が内蔵されています。これは「LAN/WLAN切り替え」と呼ばれ、BIOS/UEFI設定で切り替えることができます。

正確な手順はEliteBookのモデルによって異なるかもしれませんが、私の6930pでは以下のように動作しました。

1.起動中にF10を押してBIOS/UEFI設定に移動します。 2. システム設定 → ビルトインデバイスオプション 3. LAN/WLAN Switching “オプションを見つけ、その横にある "Enabled "ラジオボタンを選択 4. 変更を保存してBIOS/UEFI設定を終了して再起動

これでうまくいくはずです。異なるモデル(特に世代が異なる場合)をお持ちの場合は、そのモデルのユーザーマニュアルを参照してください。

HPのProtectToolsソフトウェアを使用していて、BIOS設定アドオンがインストールされている場合は、Windowsからこの設定を切り替えることができますが、有効にするには再起動が必要です。

2
Advertisement
2
2
2015-03-06 10:00:08 +0000
Advertisement

代替の PowerShell ソリューション。 https://gallery.technet.microsoft.com/scriptcenter/WLAN-Manager-f438a4d7

WLAN Manager はスケジュールされたタスクとして実行され、LAN 接続が確認されると自動的に WLAN カードを無効にします。WLAN カードは、LAN 接続が失われると再び有効になります。これにより、利用可能な最速の接続が保証され、ネットワーク ブリッジングを防ぐことができます。

Microsoft Technetの「substance」によるオリジナルコード。 Zip file

################ 
# WLAN Manager # 
################ 
#Version: 2015-03-03.2 
#Author: johan.carlsson@innovatum.se 

<# 

.SYNOPSIS 
Disables the WLAN NIC when LAN NIC network connection is verified. 
Enables WLAN NIC when LAN NIC network connection is lost. 

.DESCRIPTION 
WLAN Manager runs as a scheduled task and will automatically disable your WLAN card when a LAN connection is verified. 
The WLAN card will be re-enabled once the LAN connection is lost. This ensures you'll always have the fastest available connection and stops network bridging. 

.EXAMPLE 
.\WLANManager.ps1 -Install:$true 
Installs WLAN Manager. 

.EXAMPLE 
.\WLANManager.ps1 -Remove:$true 
Removes WLAN Manager. 

.EXAMPLE 
.\WLANManager.ps1 
Verify Installaton > Install if missing > Run Interactively (first run only, hidden run via scheduled task run after that). 

.EXAMPLE 
.\WLANManager.ps1 -Interactive:$true 
Runs WLAN Manager in an interactive window. Will not install anything. This mode is only for testing and watching what happens via console output. 

.NOTES 
None. 

.LINK 
https://support.innovatum.se 

#> 

[CmdletBinding()] 
Param 
( 
    [Parameter(Mandatory=$False,Position=1,HelpMessage="Installs WLAN Manager.")] 
    [switch]$Install, 
    [Parameter(Mandatory=$False,Position=2,HelpMessage="Removes WLAN Manager.")] 
    [switch]$Remove, 
    [Parameter(Mandatory=$False,Position=3,HelpMessage="Runs WLAN Manager interactively, doesn't install anything.")] 
    [switch]$Interactive 
) 

######################################### 
# Custom Variables for Your Environment # 
######################################### 
#Destination Path to where you want to store files for local install of WLANManager 
$CustomDestinationPath = "$env:ProgramFiles\WLANManager" 

<# 
D O N O T C H A N G E A N Y T H I N G B E L O W T H I S L I N E 
#> 

################################# 
# Unload/Load PowerShell Module # 
################################# 

#Remove PowerShell Module 
If ((Get-Module PSModule-WLANManager) -ne $null) 
    { 
        Remove-Module PSModule-WLANManager -Verbose 
    } 

#Import PowerShell Module 
$strBasePath = Split-Path -Path $MyInvocation.InvocationName 
Import-Module "$strBasePath\PSModule-WLANManager.psm1" -Verbose 

############################# 
# Install or Update Install # 
############################# 

If ($Remove -eq $true) 
    { 
        Remove-WLANManager -FilePath $CustomDestinationPath 
        return 
    } 
ElseIf ((Test-Path -Path $strBasePath) -eq $True -and ($Interactive) -ne $true) 
    { 
        #Install 
        Install-WLANManager -SourcePath $strBasePath -DestinationPath $CustomDestinationPath 
        If ($Install -eq $true) 
            { 
                #≥Windows 8 
                If ($OSInfo.Caption -match "Windows 8") 
                    { 
                        Start-ScheduledTask -TaskName "WLAN Manager" 
                        Exit 
                    } 
                #<Windows 8 
                Else 
                    { 
                        Start-STask -TaskName "WLAN Manager" | Out-Null 
                        Exit 
                    } 
            } 
    } 

######## 
# Main # 
######## 

while ($true) 
{ 
    If ((Test-WiredConnection) -eq $true -and (Test-WirelessConnection) -eq $true) 
        { 
            Write-Host "Wired connection detected, disabling Wireless connection... " -NoNewline -ForegroundColor Yellow 
            #≥Windows 8 
            If ($OSInfo.Caption -match "Windows 8") 
                { 
                    Disable-NetAdapter -InterfaceDescription *Wireless* -Confirm:$false 
                } 
            #<Windows 8 
            Else 
                { 
                    Disable-WLANAdapter | Out-Null 
                } 
            Write-Host "Done" -ForegroundColor White -BackgroundColor Green 
        } 

    If ((Test-WiredConnection) -eq $false -and (Test-WirelessConnection) -eq $false) 
        { 
            Write-Host "Wired connection lost, enabling Wireless connection... " -NoNewline -ForegroundColor Yellow 
            #≥Windows 8 
            If ($OSInfo.Caption -match "Windows 8") 
                { 
                    Enable-NetAdapter -InterfaceDescription *Wireless* -Confirm:$false 
                } 
            #<Windows 8 
            Else 
                { 
                    Enable-WLANAdapter | Out-Null 
                } 
            #Wait for WLAN Adapter to initialize and obtain an IP-address 
            while ((Test-WiredConnection) -eq $false -and (Test-WirelessConnection) -eq $false) 
                { 
                    sleep -Seconds 1 
                } 
            Write-Host "Done" -ForegroundColor White -BackgroundColor Green 
        } 

    Else 
        { 
            Write-Host "Sleeping..." -ForegroundColor Yellow 
            sleep -Seconds 1 
        } 
}
0
0
0
2017-09-07 14:44:03 +0000

あなたは、イーサネット用のドライバを持っている場合, すなわち. 私はサムスンのラップトップに高速イーサネットコントローラを使用していますが、タスクバーの右端にある

  1. イーサネットのアイコンをクリックします。
0
Advertisement
0
0
2016-10-11 12:27:52 +0000
Advertisement

起動時に F2 を押して Bios に入ります。電源管理 ] に進み、 [ 無線ラジオ制御 ] を選択して [ 無線ラジオ制御 ] を有効にし、 [ 無線ラジオ制御 ] および [ 無線ラジオ制御 ] を有効にします。有線ネットワークから切断すると、選択した無線機は再び有効になります。

0
0
0
2014-08-06 17:46:10 +0000

Moshe Katzの回答(Moshe Katzに感謝!)を参考にして、私の100台のノートパソコンでうまく動作するカスタムソリューションを考え出しました。

以下のテキストをwifiswitch.batファイルとしてC:W\windowssystem32の下に保存してください。ラップトップのインターフェース名がスクリプトと一致していることを確認してください。

@echo off
            Title Wifi Lan Switcher

            set a=0

            :loop
            netsh interface show interface name="Local Area Connection" | find /i "disconnected" > NUL 2>&1
            IF ERRORLEVEL 1 (
                netsh interface show interface name="Wireless Network Connection" | find /i "disabled" > NUL 2>&1
                IF ERRORLEVEL 1 (
                    netsh interface set interface name="Wireless Network Connection" disable > NUL 2>&1
                    set error=%errorlevel%
                    ping -n 5 127.0.0.1 >nul
                )
            ) 
            netsh interface show interface name="Local Area Connection" | find /i "disconnected" > NUL 2>&1
            IF NOT ERRORLEVEL 1 (
                netsh interface show interface name="Wireless Network Connection" | find /i "enabled" > NUL 2>&1
                    IF ERRORLEVEL 1 (
                        netsh interface set interface name="Wireless Network Connection" enable > NUL 2>&1
                        set error=%errorlevel%
                        ping -n 5 127.0.0.1 >nul
                    )
            )

            set /a a+=1

            echo.
            echo %a%
            ping -n 3 127.0.0.1 >nul
            if %a% equ 5 goto :eof
            goto :loop

            :eof
            echo.
            echo.
            set a=
            exit /b %error%

ここで、スケジュールされたタスクの下にタスクを作成する必要があります。私のタスクxmlコードを.xmlで保存し、ラップトップのタスクスケジューラにインポートすることができます。トリガータブのソースを特定のモデルに属しているものに変更してください .

<?xml version="1.0" encoding="UTF-16"?>
            <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
              <RegistrationInfo>
                <Date>2014-07-07T09:36:51.4300545</Date>
                <Author>%username%</Author>
              </RegistrationInfo>
              <Triggers>
                <EventTrigger>
                  <Enabled>true</Enabled>
                  <Subscription><QueryList><Query Id="0" Path="System"><Select Path="System">*[System[Provider[@Name='e1cexpress']]]</Select></Query></QueryList></Subscription>
                </EventTrigger>
                <BootTrigger>
                  <Enabled>true</Enabled>
                  <Delay>PT1M</Delay>
                </BootTrigger>
                <RegistrationTrigger>
                  <Enabled>true</Enabled>
                </RegistrationTrigger>
              </Triggers>
              <Principals>
                <Principal id="Author">
                  <UserId>S-1-5-18</UserId>
                  <RunLevel>HighestAvailable</RunLevel>
                </Principal>
              </Principals>
              <Settings>
                <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
                <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
                <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
                <AllowHardTerminate>true</AllowHardTerminate>
                <StartWhenAvailable>true</StartWhenAvailable>
                <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
                <IdleSettings>
                  <StopOnIdleEnd>true</StopOnIdleEnd>
                  <RestartOnIdle>false</RestartOnIdle>
                </IdleSettings>
                <AllowStartOnDemand>true</AllowStartOnDemand>
                <Enabled>true</Enabled>
                <Hidden>false</Hidden>
                <RunOnlyIfIdle>false</RunOnlyIfIdle>
                <WakeToRun>false</WakeToRun>
                <ExecutionTimeLimit>PT1H</ExecutionTimeLimit>
                <Priority>7</Priority>
                <RestartOnFailure>
                  <Interval>PT1M</Interval>
                  <Count>3</Count>
                </RestartOnFailure>
              </Settings>
              <Actions Context="Author">
                <Exec>
                  <Command>%windir%\System32\WifiSwitch.bat</Command>
                  <WorkingDirectory>%windir%\system32</WorkingDirectory>
                </Exec>
              </Actions>
            </Task>
Advertisement

関連する質問

3
13
5
16
12
Advertisement
Advertisement