Dear All ,
If you want list all the stored WiFi networks profiles use the WiFi_PreferredProfile class.
Code:
Thanks
If you want list all the stored WiFi networks profiles use the WiFi_PreferredProfile class.
Code:
Code
procedure GetWiFi_PreferredProfileInfo;
const
WbemUser ='';
WbemPassword ='';
WbemComputer ='localhost';
wbemFlagForwardOnly = $00000020;
var
FSWbemLocator : OLEVariant;
FWMIService : OLEVariant;
FWbemObjectSet: OLEVariant;
FWbemObject : OLEVariant;
oEnum : IEnumvariant;
iValue : LongWord;
begin;
FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
FWMIService := FSWbemLocator.ConnectServer(WbemComputer, 'root\CIMV2', WbemUser, WbemPassword);
FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM WiFi_PreferredProfile','WQL',wbemFlagForwardOnly);
oEnum := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
while oEnum.Next(1, FWbemObject, iValue) = 0 do
begin
Writeln(Format('Authentication %s',[FWbemObject.Authentication]));// String
Writeln(Format('Caption %s',[FWbemObject.Caption]));// String
Writeln(Format('Description %s',[FWbemObject.Description]));// String
Writeln(Format('Encryption %s',[FWbemObject.Encryption]));// String
Writeln(Format('MandatoryAp %s',[FWbemObject.MandatoryAp]));// String
Writeln(Format('Name %s',[FWbemObject.Name]));// String
Writeln(Format('OperationMode %s',[FWbemObject.OperationMode]));// String
Writeln(Format('SettingID %s',[FWbemObject.SettingID]));// String
Writeln(Format('SSID %s',[FWbemObject.SSID]));// String
Writeln(Format('Stealth %s',[FWbemObject.Stealth]));// Boolean
Writeln(Format('Type %s',[FWbemObject.Type]));// String
FWbemObject:=Unassigned;
end;
end;Thanks


