Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wlanapi Permissions bug on Windows 10 #71

Open
MattCatz opened this issue Feb 16, 2022 · 1 comment · May be fixed by #72
Open

Wlanapi Permissions bug on Windows 10 #71

MattCatz opened this issue Feb 16, 2022 · 1 comment · May be fixed by #72

Comments

@MattCatz
Copy link

I ran into the issue discussed here:
https://docs.microsoft.com/en-us/answers/questions/397654/34netsh-wlan-connect34-wlanapiwlanconnect-from-wit.html

I am remoting into my Windows 10 machine using the built-in openssh server and running scripts that use pywifi. I purpose that we remove the WLAN_PROFILE_USER (0x2) from the call to WlanSetProfile

def _wlan_set_profile(self, handle, iface_guid, xml, overwrite, reason_code):
func = native_wifi.WlanSetProfile
func.argtypes = [HANDLE, POINTER(
GUID), DWORD, c_wchar_p, c_wchar_p, c_bool, c_void_p, POINTER(DWORD)]
func.restypes = [DWORD]
return func(handle, iface_guid, 2, xml, None, overwrite, None, reason_code)

@MattCatz MattCatz linked a pull request Feb 16, 2022 that will close this issue
@swswswsml
Copy link

I also encountered the same issue . I solved the issue with your commit. My service is Jenkins. I guess the issue is caused by the lack of permission of the windows user Jenkins logs in

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 a pull request may close this issue.

2 participants