Indy ping是否需要UAC提升? [英] Does Indy ping require UAC elevation?
问题描述
Indy ICMP组件是否需要管理员特权才能ping通?
Does the Indy ICMP component require Administrator privileges to ping?
如果在打开UAC的情况下运行但没有提升的特权,则会收到访问被拒绝"错误消息.
查看这个问题,听起来好像Indy ICMP使用RAW套接字,因此需要提升的特权?
If I run with UAC turned on but without elevated privileges I get an "Access Denied" error message.
Looking at this question it sounds like Indy ICMP uses RAW sockets and thus needs elevated privileges?
我正在使用Delphi 2007& Indy 10.x并在Windows 7 Pro下进行测试.
I'm developing using Delphi 2007 & Indy 10.x and testing under Windows 7 Pro.
推荐答案
My colleague found this Article states that the Indy ICMP component uses RAW Windows sockets, which under Vista or later requires elevated privileges to run under UAC.
我修改了程序以请求UAC提升,现在可以ping通了.
I adapted the program to request UAC elevation and it's now pinging okay.
另一种选择是直接调用ICMPSendEcho()及其相关函数.
The alternative would be to call the ICMPSendEcho() and it's related functions directly.
这篇关于Indy ping是否需要UAC提升?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!