Jump to content

Multiple Wireless Nic's

Hi, 
At work i am trying to get a program that connects students to our network work and unfortunately for the students we only have 5GHz wireless frequency running. The problem is that not all students laptop can support that frequency so we have advised them to go out and buy a wireless dongle that does as a cheaper alternative to buying a new laptop. 

The program we use to connect the students and to map the network drives uses autoit to create the wireless profile. However for the student that have purchased the wireless dongle the program isn't setting the profile for the second wireless.  How does one go about making adjustments to the autoit script so that the profile is created for both wireless devices or just the second device?

 

NOTE: I have no programming skills. Code below was written by an ex-coworker and i adjusted the SSD and encryption type for our network. 

Current Code
 

#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=ConnectCLI.exe
#AutoIt3Wrapper_UseUpx=y
#AutoIt3Wrapper_Change2CUI=n
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <./Nativewifi/nativewifi.au3>
#include <array.au3>

local $sReason, $asProfileList, $name,$user,$pass
;Check to see that 3 parameters have been passed. username, password and BYOD Name
if $CmdLine[0] <> 3 then
	;MsgBox(0,"Error","Please supply 3 parameters, username, password, BYOD Network Name")
	Exit
Else
	$user = $CmdLine[1]
	$pass = $CmdLine[2]
	$name = $CmdLine[3]
EndIf

$fDebugWifi = True
_Wlan_StartSession()

$oProfile = _Wlan_CreateProfileObject()
With $oProfile
	.Name = $name
	.SSID.Add("Placeholder")
	.Type = "Infrastructure"
	.Options.NonBroadcast = true
	.Auth = "WPA"
	.Encr = "AES"
	.Options.ConnMode = "Automatic"
	.OneX.Enabled = true
	.OneX.AuthMode = "User"
	;.OneX.CacheUserData = False
	.EAP.BaseType = "PEAP"
	.EAP.Type = "PEAP-MSCHAP"
	.EAP.PEAP.ServerValidation.Enabled = False
	.EAP.PEAP.ServerValidation.AcceptServerNames = True
	.EAP.PEAP.FastReconnect = False
	.EAP.PEAP.MSCHAP.UseWinLogonCreds = false
 EndWith

if _Wlan_SetProfile($oProfile, $sReason) = false Then
	MsgBox(0,"Error setting Profile",$sReason)
EndIf

$oUserData = _Wlan_CreateUserDataObject()
With $oUserData
	.BaseType = "PEAP"
	.Type = "PEAP-MSCHAP"
	.PEAP.MSCHAP.Username = $user
	.PEAP.MSCHAP.Password = $pass
EndWith


 _Wlan_SetProfileUserData($name,$oUserData)

_Wlan_Connect($name,true)

 

Link to comment
https://linustechtips.com/topic/546189-multiple-wireless-nics/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×