inverse-inc / packetfence-windows-agent

Windows application for WiFi and wired autoconfiguration with PacketFence.
10 stars 8 forks source link

Admin rights are necessary to install network profile #10

Open nqb opened 4 years ago

nqb commented 4 years ago

If you run Windows provisioner as a standard user on a Windows 10 machine, certificates will be installed but you will get following error message displayed:

The wireless profile could not be added to your machine, please contact your local support.

When running application inside a command prompt as local user:

C:\Users\nqb\Downloads>"packetfence-windows-agent (2).exe"
2020/10/30 10:43:30 ==================== PacketFence Provisioning Agent ===================
2020/10/30 10:43:30 User's locale is: 0x409
2020/10/30 10:43:30 Language file successfully created.
2020/10/30 10:43:30 PNG file pf_bg.png successfully created.
2020/10/30 10:43:39 Success Your certificate was successfully installed, please press OK to continue.
2020/10/30 10:43:39 Success The CA was successfully installed on your machine.
2020/10/30 10:43:39 Information: The profile file was successfully created.
2020/10/30 10:43:39 Failed adding profile: output:
Failed to add machine profile due to error 740.

%!(EXTRA *exec.ExitError=exit status 1)

netsh commands used to install profile require admin rights.

nqb commented 4 years ago

For Windows 10 (version 2004), we can try to use this feature: https://docs.microsoft.com/en-us/windows/win32/nativewifi/prov-wifi-profile-via-website.

Guide only speaks about WLAN profiles but I'm sure we can use this feature to configure LAN or WLAN profiles as Microsoft provided examples file for both: