Skip to content

Conversation

@w6rsty
Copy link

@w6rsty w6rsty commented Sep 5, 2024

Due to the fact that netsh output is based on the system's language settings, simply using "completed successfully" to check the result will not work in other languages

if !String::from_utf8_lossy(&output.stdout)
.as_ref()
.contains("completed successfully")

To address this issue while keeping the solution simple, I use the user-provided ssid to match the output of
netsh wlan show interfaces

I've also added a check to see if the system is already connected to the specified WLAN

1.Fix error when enter a wrong password but output is connected
2. Add check for already connected ssid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant