抄的:
function GetNetWorkgroup : string;
var
Reg : TRegistry;
begin
Reg := TRegistry.create;
Result := '(n/a)';
with Reg do
try
RootKey := HKEY_LOCAL_MACHINE;
if OpenKey('System/CurrentControlSet/Services/VxD/VNETSUP',
false) then
Result := ReadString('Workgroup');
finally
CloseKey;
free;
end;
end;