Воспользуемся функцией GetSystemMetrics(), переслав ей флаг SM_NETWORK:
procedure TForm1.Button2Click(Sender: TObject); begin if GetSystemMetrics(SM_NETWORK) and $01 = $01 then ShowMessage('Machine is attached to network') else ShowMessage('Machine is not attached to network'); end;