try
const
WorkKey='System\CurrentControlSet\Services\VxD\VNETSUP';
LogKey='System\CurrentControlSet\Services\MSNP32\NetworkProvider';
procedure TForm1.FormCreate(Sender: TObject);
var
reg : TRegistry;
domain, log : string;
begin
reg:=TRegistry.create;
reg.RootKey:=HKEY_LOCAL_MACHINE;
if reg.KeyExists(WorkKey) then
begin
if reg.OpenKey(WorkKey,false) then
begin
domain:=Reg.ReadString('Workgroup');
Label3.Caption:= domain;
reg.CloseKey;
end;
end;
if reg.KeyExists(LogKey) then
begin
if reg.OpenKey(Log,false) then
begin
log:=Reg.ReadString('AuthenticatingAgent');
Label4.Caption:= log;
reg.CloseKey;
end;
end;
reg.Free;
end;