I need some guidance in deploying preferred networks using vbscript . I have
a script that add a ssid and the other settings to the registry, but i cannot
see it in "prefered networks". This script should activate the checkbox "Let
windows manage...".
This is what i have:
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
'Get the id of the wireless NetworkCard
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\13"
strValueName = "ServiceName"
oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
Wscript.Echo "networkcard id Value: " & strValue
'Create key with the id
strKeyPath = "SOFTWARE\Microsoft\EAPOL\Parameters\Interfaces\" & strvalue
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
'Add a binaryvalue with the settings of the wireless conection
BinaryValueName="1"
iValues=Array(&H05,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H40,&H0d,&H00,&H00,&H00,&H04,&H00,&H00,&H00,&H65,&H2d,&H55,&H4d,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H0d,&H00,&H00,&H00,&H28,&H00,&H00,&H00,&H00,&H00,&H00,&H00,&H28,&H00,&H00,&H00,&H05,&H00,&H00,&H00)
oReg.SetBinaryValue HKEY_LOCAL_MACHINE,strKeyPath,_
BinaryValueName,iValues
If someone can point me in the right direction I would appreciate it.