Имя пользователя:
Пароль:
 

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

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


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

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


Nordek, спасибо огромное! На прошлой неделе сделала что-то такое. Не знаю, насколько изящно, но работает

Версии Винды и установка MS SQL 2008/ 2012

Код: Выделить весь код
 begin
    GetWindowsVersionEx(Version);

  // On Windows < 6.0
  if (Version.Major < 6) then begin
      TypSerweraCheckListBox.ItemEnabled[IndexSerwera2008] := True;
      TypSerweraCheckListBox.Checked[IndexSerwera2008] := True;
      
      TypSerweraCheckListBox.ItemEnabled[IndexSerwera2012] := False;
      TypSerweraCheckListBox.Checked[IndexSerwera2012] := False;
   
  end 

  // Windows 6.0 || 6.1
  else if (Version.Major = 6) and (Version.Minor >= 0)
          and (Version.Minor <= 1)
  then  begin
      TypSerweraCheckListBox.ItemEnabled[IndexSerwera2008] := True;
      TypSerweraCheckListBox.Checked[IndexSerwera2008] := True;
      
      TypSerweraCheckListBox.ItemEnabled[IndexSerwera2012] := True;
      TypSerweraCheckListBox.Checked[IndexSerwera2012] := False;
  end 

  else begin
      TypSerweraCheckListBox.ItemEnabled[IndexSerwera2008] := False;
      TypSerweraCheckListBox.Checked[IndexSerwera2008] := False;
      
      TypSerweraCheckListBox.ItemEnabled[IndexSerwera2012] := True;
      TypSerweraCheckListBox.Checked[IndexSerwera2012] := True;
  end
  end;


А есть еще один вопрос: как можно получить список инстанций MS SQL? Даже не знаю, как и что в гугле спрашивать...

Последний раз редактировалось maraby, 05-05-2015 в 15:21.


Отправлено: 15:02, 05-05-2015 | #577