![]() |
Ping & Windows 7
Hallo...
folgende meldung erhalte ich bei unten stehendem Code. Ich kann unter Windows 7 nicht mehr pingen, kann mir jemand dabei helfen? Zitat:
Delphi-Quellcode:
unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, IdBaseComponent, IdComponent, IdRawBase, IdRawClient, IdIcmpClient, StdCtrls; type TForm1 = class(TForm) Button1: TButton; ICMP: TIdIcmpClient; ListBox1: TListBox; procedure ICMPReply(ASender: TComponent; const AReplyStatus: TReplyStatus); procedure Button1Click(Sender: TObject); private { Private-Deklarationen } public { Public-Deklarationen } end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.ICMPReply(ASender: TComponent; const AReplyStatus: TReplyStatus); var sTime: string; begin if (AReplyStatus.MsRoundTripTime = 0) then sTime := '< 1' else sTime := '='; Listbox1.Items.Add(Format('%d bytes from %s: icmp_seq=%d ttl=%d time%s%d ms', [AReplyStatus.BytesReceived, AReplyStatus.FromIpAddress, AReplyStatus.SequenceId, AReplyStatus.TimeToLive, sTime, AReplyStatus.MsRoundTripTime])); end; procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin Icmp.Host := 'www.delphi-treff.de'; for i := 1 to 4 do begin Icmp.Ping; Application.ProcessMessages; end; end; end. |
Re: Ping & Windows 7
Für den Indy Ping braucht man Administratorenrechte. Dürfte also schon unter Vista nicht geklappt haben.
|
Re: Ping & Windows 7
AFAIK benötigt die PING-Komponente von Indy Admin-Rechte.
Und nein - wenn du UAC aktiv hast hat dein Prozess keine Adminrechte auch wenn du in der Admingruppe bist. |
Re: Ping & Windows 7
Okay...und was kann ich nun tun, muss mein Programm dann immmer als Admin ausgeführt werden?
und was ist mit Zitat:
Gruss vom Capo |
Re: Ping & Windows 7
Zitat:
Zitat:
|
Re: Ping & Windows 7
Zitat:
Zitat:
|
Re: Ping & Windows 7
Zitat:
Wenn du willst das sie mit gestartet werden so brauchst du ein entsprechendes Manifest und der User bekommt jedesmal die Meldung das doch ein unbekanntes Programm auf den Rechner zugreifen will -> Abschreckend für "Den normalen Anwender". |
Re: Ping & Windows 7
Hier ein Tutorial von mir, welches sich mit der UAC beschäftigt. Dort ist auch beschrieben, wie dein Programm sich Admin-Rechte holt. Auch wenn du jetzt eine andere Komponente nimmst, solltest du dennoch grob darüber bescheid wissen ;)
![]() Grüße! |
Re: Ping & Windows 7
@DJ-SPM ...da hast du Recht. Vielen Dank.
|
Re: Ping & Windows 7
Gerne. Wenn du Fragen hast, melde dich einfach.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:16 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz