环景:
win10专业版
电脑之前从未连接过这个WIFI
批处理⽂件内容如下(不全):
@echo off
贴片变压器
powershell -c “Get-Content -LiteralPath ‘%~0’ | Select-Object -Skip 3 | Out-String | Invoke-Expression”
pause&exit
set-ExecutionPolicy RemoteSigned
pfc电感
$wifiName=“你的ssid”; # WIFI NAME
基因
调控网络
$wifiKey=“你的password”; # WIFI PASSWORD
$xml_Template=@"
<?xml version="1.0"?> WIFI_NAME WIFI_NAME_HEX WIFI_NAME ESS manual WPA2PSK AES false passPhrase false模具制作
WIFI_KEY false 634562794 "@ $wifiNameHex=""; foreach ($each in [System.Text.Encoding]::UTF8.GetBytes($wifiName)) { $wifiNameHex+=("{0:x}" -f $each).ToUpper();} $xmlFile="WLAN-{0}.xml" -f $wifiName $xml=$xml_Template -replace "WIFI_NAME_HEX",$wifiNameHex -replace "WIFI_NAME",$wifiName -replace "WIFI_KEY",$wifiKey $xml | Out-File $xmlFile -Encoding utf8 netsh wlan delete profile $wifiName 2>$null netsh wlan add profile $xmlFile netsh wlan connect $wifiName Remove-Item -LiteralPath $xmlFile
默认加密⽅式WPA2PSK,如果是其它的,改⼀下21⾏看看能不能正常连接wifi文件传输