Function HasInternetconnect:boolean;
var REG:TRegistry;
dat:array[0..3] of char;
begin
reg:=TRegistry.Create;
reg.RootKey:=HKEY_LOCAL_MACHINE;
reg.OpenKey('System/CurrentControlSet/Services/RemoteAccess',false);
reg.ReadBinaryData('Remote Connection',dat,4);
reg.free;
result:=(dat[0]=#1);
end;