Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Новый участник


Сообщения: 38
Благодарности: 0

Профиль | Отправить PM | Цитировать


Подскажите почему "identifer expected" на else

Код: Выделить весь код
function InitializeSetup(): Boolean;
var
    ErrorCode: Integer;
    NetFrameWorkInstalled : Boolean;
    Result1 : Boolean;
begin
  NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0');
  if NetFrameWorkInstalled =true then
    begin
      Result := true;
end;
  if NetFrameWorkInstalled = false then
    begin
      Result1 := MsgBox('This setup requires the .NET Framework. Please download and install the .NET Framework and run this setup again. Do you want to download the framwork now?',
      mbConfirmation, MB_YESNO) = idYes;
  if Result1 =false then
    begin
      Result:=false;
    end;
else
begin
      Result:=false;
      InstShellExec('http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&SrcDisplayLang=ru&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f7%2f567758a3-759e-473e-bf8f-52154438565a%2fdotnetfx.exe','','',SW_SHOWNORMAL,ErrorCode);
begin
  NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
  if NetFrameWorkInstalled =true then
    begin
      Result := true;
end;
  if NetFrameWorkInstalled = false then
    begin
      Result1 := MsgBox('This setup requires the .NET Framework. Please download and install the .NET Framework and run this setup again. Do you want to download the framwork now?',
      mbConfirmation, MB_YESNO) = idYes;
  if Result1 =false then
    begin
      Result:=false;
    end;
else
begin
      Result:=false;
      InstShellExec('http://www.microsoft.com/downloads/info.aspx?na=41&SrcFamilyId=0A391ABD-25C1-4FC0-919F-B21F31AB88B7&SrcDisplayLang=ru&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f9%2f5%2fA%2f95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE%2fdotNetFx40_Full_x86_x64.exe','','',SW_SHOWNORMAL,ErrorCode);
end;
end;
end;
end;
end;
end;
end;

Отправлено: 23:05, 25-04-2012 | #1673