作者: LEARZA 時間: 2021-9-9 21:46 標題: [求教] netsh wlan 如何成功 add profile???
本帖最後由 LEARZA 於 2021-9-9 21:49 編輯
有待指點
There is 1 interface on the system:
Name : wlan
netsh wlan add profile filename="Profile1.xml" interface="wlan" user=current
The system cannot find the file specified.

[attach]2282272[/attach]
如題
作者: tol4kzk 時間: 2021-9-9 21:48
咪寫左搵唔到你個xml,你打返full path 啦
via HKEPC IR Extreme 4.2.3 - iOS(4.0.2)
作者: LEARZA 時間: 2021-9-9 21:55
本帖最後由 LEARZA 於 2021-9-9 21:58 編輯
請問前輩
xml 的 "full path" 係 windows 預定, 或是可以自訂呢?
netsh wlan>add profile filename="r:\001.xml" interface="wlan" user=current
The system cannot find the file specified.
先用NOTEPAD自行建立 001.xml
然後
netsh wlan add profile filename="001.xml" interface="wlan" user=current
An attempt was made to load a program with an incorrect format.
作者: bunch 時間: 2021-9-9 21:55
回復 1 #LEARZA
首先,你果個已經寫好config嘅xml響邊?定係從來不存在?
via HKEPC Reader for Android
作者: LEARZA 時間: 2021-9-9 21:58
本帖最後由 LEARZA 於 2021-9-9 22:00 編輯
回覆 4# bunch
從不存在吧
原來先要"寫好config"
如何寫呢
netsh wlan add profile ? < 未見提示....
作者: bunch 時間: 2021-9-9 22:07
個config係D咁既野黎
你係要曾經手動MAP過果個SSID (例如我當果個SSID係ABCD)
然後用下面COMMAND去BACKUP
netsh wlan export profile name="ABCD" folder="C:\temp"
咁你響C:\Temp先會見到類似呢個FILE既野
[attach]2282279[/attach]
你就咁嘔係嘔唔出個FILE既
作者: LEARZA 時間: 2021-9-9 22:14
本帖最後由 LEARZA 於 2021-9-9 22:31 編輯
回覆 6# bunch
學習了!!!
原來佢個 "add" = import
而唔係從 冇到有
請問....
什麼指令才用作連接新SSID呢
要用powershell嗎?
作者: bunch 時間: 2021-9-9 22:36
本帖最後由 bunch 於 2021-9-9 22:43 編輯
回覆 7# LEARZA
你可以嘗試咁寫個XML, 但我唔肯定佢WORK, 自己改個SSID同PASSWORD
然後再行netsh wlan add profile filename="FULLFILEPATH"
- <?xml version="1.0"?>
- <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
- <name>SSID</name>
- <SSIDConfig>
- <SSID>
- <name>SSID</name>
- </SSID>
- </SSIDConfig>
- <connectionType>ESS</connectionType>
- <connectionMode>manual</connectionMode>
- <MSM>
- <security>
- <authEncryption>
- <authentication>WPA2PSK</authentication>
- <encryption>AES</encryption>
- <useOneX>false</useOneX>
- </authEncryption>
- <sharedKey>
- <keyType>passPhrase</keyType>
- <protected>false</protected>
- <keyMaterial>PASSWORD</keyMaterial>
- </sharedKey>
- </security>
- </MSM>
- <MacRandomization xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
- <enableRandomization>false</enableRandomization>
- </MacRandomization>
- </WLANProfile>
作者: LEARZA 時間: 2021-9-10 00:21
回覆 8# bunch
多謝眾前輩相助
現已明白到Windows 10 純文字 connect new SSID 的流程
1) 打好份WLANProfile in paint text
WLANProfile 必要格式內容如下, 少1粒字都不可
2) netsh wlan add profile just_a_name
3) netsh wlan connect just_a_name
就可以連接到全新既Wi-Fi network
咁搞法還是用GUI吧
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>just_a_name</name>
<SSIDConfig>
<SSID>
<name>ESSID</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>manual</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>WPA2PSK</authentication>
<encryption>AES</encryption>
</authEncryption>
<sharedKey>
<keyType>passPhrase</keyType>
<protected>false</protected>
<keyMaterial>PASSWORD</keyMaterial>
</sharedKey>
</security>
</MSM>
</WLANProfile>
作者: bunch 時間: 2021-9-10 00:44
回覆 9# LEARZA
基本上舊野係你有幾十部機要SET
打個BATCH FILE一次過搞掂
得一部機的話, CLICK兩CLICK快過你寫咁多野...
作者: LEARZA 時間: 2021-9-11 00:46
回覆 10# bunch
多謝指導

