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

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

Пользователь


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

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


habib2302, Можно добавить проверку на систему, и создавать папку исходя из этого.
Скрытый текст
Код: Выделить весь код
 
function ForWindows8One(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Windows 8.1 version is 6.3 (workstation)
  if (Version.Major = 6)  and
     (Version.Minor = 3) and
     (Version.ProductType = VER_NT_WORKSTATION)
  then
    Result := True
  else
    Result := False;
end;
  
  function ForWindows7(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Windows 7 version is 6.1 (workstation)
  if (Version.Major = 6)  and
     (Version.Minor = 1) and
     (Version.ProductType = VER_NT_WORKSTATION)
  then
    Result := True
  else
    Result := False;
end;

function ForWindowsVistaAndWindows2008(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Anything with major version 6 where we won't use Windows 7 driver
  if (Version.Major = 6) and
     (not ForWindows7)
  then
    Result := True
  else
    Result := False;
end;

function ForWindows2003(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Windows 2003 version is 5.2 (server)
  if (Version.Major = 5)  and
     (Version.Minor = 2)  and
     (Version.ProductType <> VER_NT_WORKSTATION)
  then
    Result := True
  else
    Result := False;
end;

 function ForWindowsXP(): Boolean;
var
  Version: TWindowsVersion;
begin
  GetWindowsVersionEx(Version);
  // Anything with major version 5 where we won't use Windows 2003 driver
  if (Version.Major = 5) and
     (not ForWindows2003)
  then
    Result := True
  else
    Result := False;
end;

procedure CurStepChanged(CurStep: TSetupStep);
  begin
  if CurStep = ssInstall then
  begin
     If ForWindowsXP then
     ForceDirectories(ExpandConstant('{src}\S-1-5-21-3919186426-968546183-1294672792-1001-XP\test2')); //создаем папки
     If ForWindowsVistaAndWindows2008 then
     ForceDirectories(ExpandConstant('{src}\S-1-5-21-3919186426-968546183-1294672792-1001-Vista\test2')); //создаем папки
     If ForWindows7 then
     ForceDirectories(ExpandConstant('{src}\S-1-5-21-3919186426-968546183-1294672792-1001-7\test2')); //создаем папки
     If ForWindows8One then
     ForceDirectories(ExpandConstant('{src}\S-1-5-21-3919186426-968546183-1294672792-1001-8\test2')); //создаем папки
  end;
  end;

Отправлено: 20:53, 16-06-2015 | #712