{ UpdateIPForm_NextButtonClick }
function UpdateIPForm_NextButtonClick(Page: TWizardPage): Boolean;
var
s: string;
sTestUrl: string;
rst: Boolean;
begin
s := Trim(tbUpdateIP.Text);
if (s = '') then
begin
MsgBox(ExpandConstant('请输入更新地址!'), mbError, MB_OK);
Result := false;
end else
begin
URL := s; //将输入的地址作为URL
sTestUrl := s + 'App4U.xml';
try
WinHttpRequest.Open('GET', sTestUrl);
WinHttpRequest.Send('');
if Pos('<App4U>', WinHttpRequest.ResponseText) > 0 then
begin
rst := true;
end else
begin
rst := false;
end;
except
rst := false;
end;
if rst then
begin
Result := true;
end else
begin
MsgBox(ExpandConstant('输入的更新地址有误,请重新输入!'), mbError, MB_OK);
Result := false;
end;
end;
end;
自己已经实现 如需详细代码 请联系我。