Проблема Помогите доделать установщик Рандомные ключи

AlexZetCrow

Новичок
Я уже заколебался, не знаю какую функцию вписать для GetRandomKey ни один не срабатывает пишет ошибку .. уже не знаю что и делать, помогите пожалуйста.

[Setup]
AppName=History Of Middle-Earth™
AppVerName=History Of Middle-Earth: BFME III
AppId={{1672F537-766B-4C4A-8B98-89AF90CDAC34}
AppVersion=1.0
AppPublisher=Repack - Herald of the Ring
AppPublisherURL=https://vk.com/thoakodding
AppSupportURL=https://vk.com/thoakodding
AppUpdatesURL=https://vk.com/thoakodding
DefaultDirName={sd}\Games\BFME III
DefaultGroupName=History Of Middle-Earth: BFME III Repack by Herald of the Ring
OutputBaseFilename=setup
Compression=lzma2
DisableDirPage=auto
DisableProgramGroupPage=auto
AllowNoIcons=yes
InfoBeforeFile=embedded\InfoBefore.rtf
InfoAfterFile=embedded\InfoAfter.rtf
WizardImageFile=embedded\WizardImage0.bmp
WizardSmallImageFile=embedded\WizardSmallImage0.bmp

[Files]
Source: "{app}\Readme.txt"; DestDir: "{app}"; MinVersion: 0.0,1.0;
Source: "{app}\info.rtf"; DestDir: "{app}"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini"; DestDir: "{userappdata}\My Battle for Middle-earth(tm) II Files"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini"; DestDir: "{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My The History Of Ages™ Mod Files\Options.ini"; DestDir: "{userappdata}\My The History Of Ages™ Mod Files"; MinVersion: 0.0,1.0;

Код:
type
  HDC = LongWord;

function GetDC(HWND: hWnd): HDC; external 'GetDC@user32.dll stdcall';
function GetDeviceCaps(HDC: HDC; Index: Integer): Integer; external 'GetDeviceCaps@gdi32.dll stdcall';
function ReleaseDC(HWND: hWnd; DC: HDC): Integer; external 'ReleaseDC@user32.dll stdcall';

function GetMonitorInfo: TPoint;
var
  DC: HDC;
  Screen, null: TPoint;
begin
  Result:=null;
  DC:=GetDC(MainForm.Handle);
  Screen.x:=GetDeviceCaps(DC, 08);
  Screen.y:=GetDeviceCaps(DC, 10);
  if (Screen.x <> 0) and (Screen.y <> 0) then Result:=Screen;
  ReleaseDC(MainForm.Handle, DC);
end;

function SetResolutionInINI(FileName: PAnsiChar): Boolean;
var
  s: AnsiString;
  Screen: TPoint;
  i, b, e: Integer;
  ErrCheck: Boolean;
begin
  Result:=False;
  if not LoadStringFromFile(FileName, s) then Exit;
  if Pos('Resolution', s) <> 0 then begin
    for i:=Pos('Resolution', s) + Length('Resolution') to Length(s)-1 do begin
      if (s[i] = '=') and ErrCheck then Exit;
      if (s[i] = '=') and not ErrCheck then begin
        ErrCheck:=True;
        b:=i;
      end;
      if s[i] = #13 then begin
        e:=i;
        Break;
      end;
    end;
    Screen:=GetMonitorInfo;
    Result:=SaveStringToFile(FileName, Copy(s, 0, b)+' '+IntToStr(Screen.x)+' '+IntToStr(Screen.y)+Copy(s, e, Length(s)-e-1), False);
  end;
end;

procedure InitializeWizard;
begin
  SetResolutionInINI(ExpandConstant('{src}\Options.ini'));
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\...\Options.ini'));
  end;
end;

function GetDefRoot(Param: String): String;
begin
  if not IsAdmin then
    Result := ExpandConstant('{localappdata}')
  else
    Result := ExpandConstant('{pf}')
end;






[Registry]
Root: HKLM; Subkey: "Software\Electronic Arts"; MinVersion: 0.0,1.0; Flags: createvalueifdoesntexist uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts"; MinVersion: 0.0,1.0; Flags: createvalueifdoesntexist uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Language"; ValueType: String; ValueData: "russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "$10000"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "My Battle for Middle-earth(tm) II Files"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Version"; ValueType: Dword; ValueData: "$10006"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II\ergc"; ValueType: String; ValueData: "{code:GetRandomKey}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Language"; ValueType: String; ValueData: "russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "$20000"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "My The Lord of the Rings, The Rise of the Witch-king Files"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Version"; ValueType: Dword; ValueData: "$20001"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\ergc"; ValueType: String; ValueData: "{code:GetRandomKey}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "Language"; ValueType: String; ValueData: "russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "$30000"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "My The History Of Ages™ Mod Files"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "Version"; ValueType: Dword; ValueData: "$30001"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™\ergc"; ValueType: String; ValueData: "{code:GetRandomKey}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II\1.0"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Battle for Middle-earth™ II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II\1.0"; ValueName: "Language"; ValueType: Dword; ValueData: "$10"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II\1.0"; ValueName: "LanguageName"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "CacheSize"; ValueType: String; ValueData: "5441287168"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Battle for Middle-earth™ II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Install Dir"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Language"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Product GUID"; ValueType: String; ValueData: "{{2A9F95AB-65A3-432c-8631-B8BC5BF7477A}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Region"; ValueType: String; ValueData: "NorthAmerica"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Registration"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\Electronic Arts\The Battle for Middle-earth II\ergc"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Suppression Exe"; ValueType: String; ValueData: "rtsi.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "SwapSize"; ValueType: String; ValueData: "0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™\1.0"; ValueName: "DisplayName"; ValueType: String; ValueData: "The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™\1.0"; ValueName: "Language"; ValueType: Dword; ValueData: "$10"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™\1.0"; ValueName: "LanguageName"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "CacheSize"; ValueType: String; ValueData: "3139187712"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "DisplayName"; ValueType: String; ValueData: "The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Install Dir"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Language"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; MinVersion: 0.0,1.0;   
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Product GUID"; ValueType: String; ValueData: "{{FF29EB11-AA54-4E5C-B0DF-B9C7FF84CDB7}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Region"; ValueType: String; ValueData: "NorthAmerica"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Registration"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\Electronic Arts\The History Of Ages™\ergc"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Suppression Exe"; ValueType: String; ValueData: "rtsi.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "SwapSize"; ValueType: String; ValueData: "0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\1.0"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Rise of the Witch-king™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\1.0"; ValueName: "Language"; ValueType: Dword; ValueData: "$10"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\1.0"; ValueName: "LanguageName"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "CacheSize"; ValueType: String; ValueData: "3139187712"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Rise of the Witch-king™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Install Dir"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Language"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Product GUID"; ValueType: String; ValueData: "{{B931FB80-537A-4600-00AD-AC5DEDB6C25B}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Region"; ValueType: String; ValueData: "NorthAmerica"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Registration"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\ergc"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Suppression Exe"; ValueType: String; ValueData: "rtsi.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "SwapSize"; ValueType: String; ValueData: "0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\THOA.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\THOA.exe"; MinVersion: 0.0,1.0;

[Run]
Filename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.exe"; Description: "{cm:LaunchProgram,The History Of Ages™}"; MinVersion: 0.0,1.0; Flags: postinstall skipifsilent nowait
Filename: "{app}\Readme.txt"; Description: "Прочитать гайд для игры по сети"; MinVersion: 0.0,1.0; Flags: shellexec postinstall skipifsilent nowait

[Icons]
Name: "{group}\The Battle for Middle-earth II"; Filename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.ico"; MinVersion: 0.0,1.0;
Name: "{group}\The Rise of the Witch-king"; Filename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.ico"; MinVersion: 0.0,1.0;
Name: "{group}\The History Of Ages™ Launcher"; Filename: "{app}\Electronic Arts\The History Of Ages™\launcher.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\THOA.ico"; MinVersion: 0.0,1.0;
Name: "{group}\The History Of Ages™ GameRanger"; Filename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.ico"; MinVersion: 0.0,1.0;
Name: "{group}\Удалить игру"; Filename: "{uninstallexe}"; WorkingDir: "{app}"; MinVersion: 0.0,1.0;
Name: "{group}\Наша группа Вконтакте"; Filename: "https://vk.com/thoakodding"; MinVersion: 0.0,1.0;
Name: "{commondesktop}\CDKeyFixer"; Filename: "{app}\Electronic Arts\CDKeyFixer (Tools Modding)\CDKeyFixer\CDKeyFixer.exe"; WorkingDir: "{app}\Electronic Arts\CDKeyFixer (Tools Modding)\CDKeyFixer"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The Battle for Middle-earth II"; Filename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; IconFilename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The Rise of the Witch-king"; Filename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; IconFilename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The History Of Ages™ Launcher"; Filename: "{app}\Electronic Arts\The History Of Ages™\launcher.exe"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\THOA.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The History Of Ages™ GameRanger"; Filename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.exe"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; MinVersion: 0.0,1.0;
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; MinVersion: 0.0,1.0; OnlyBelowVersion: 0.0,6.01;

[UninstallDelete]
Type: files; Name: "{app}\*.ini";
Type: files; Name: "{app}\Log\*.log";
Type: dirifempty; Name: "{app}\Log";

[CustomMessages]
russian.NameAndVersion=%1, версия %2
russian.AdditionalIcons=Дополнительные значки:
russian.CreateDesktopIcon=Создать значок на &Рабочем столе
russian.CreateQuickLaunchIcon=Создать значок в &Панели быстрого запуска
russian.ProgramOnTheWeb=Гайд %1 в интернете
russian.UninstallProgram=Деинсталлировать %1
russian.LaunchProgram=Запустить %1
russian.AssocFileExtension=Св&язать %1 с файлами, имеющими расширение %2
russian.AssocingFileExtension=Связывание %1 с файлами %2...
russian.AutoStartProgramGroupDescription=Автозапуск:
russian.AutoStartProgram=Автоматически запускать %1
russian.AddonHostProgramNotFound=%1 не найден в указанной вами папке.%n%nВы всё равно хотите продолжить?

[Languages]
Name: "russian"; MessagesFile: "embedded\russian.isl";
[/SPOILER]
 

Вложения

Shegorat

Lord of Madness
Администратор
@AlexZetCrow, хммм, видимо вы пытаетесь скомпилировать скрипт, вытащенный из какого-то инсталлятора.
Ну очевидно, что функция должна иметь следующую сигнатуру
Код:
function GetRandomKey(): String;
begin
  // тут что-то делаем
end;
Возвращать должна какой-то цифровой ключ для игры из предустановленного в скрипте набора, возможно использовались заранее сгенерированные ключи.
Типа такого
Код:
25KT-D6UV-V2AZ-7V2J-6RLD
Когда у вас будет больше данных как это должно работать, и набор готовых ключей - можно будет сделать и функцию, для выбора случайного ключа из набора
 

Andreo Fadio

Старожил
Когда у вас будет больше данных как это должно работать, и набор готовых ключей - можно будет сделать и функцию
А зачем так мучится и выдумывать, когда можно тот же:
{commondesktop}\CDKeyFixer.exe
Запустить на Postinstall и пользователь сам заменит ключ на ему удобный, чем писать получение рандом ключа от программы.
 

AlexZetCrow

Новичок
Я уже исправил, хотя ключи не проверял, код тот можете более не смотреть, вот актуальный, не знаю насчет работает или нет. Отдельно ниже приведена функция с ключом.

[Setup]
AppName=History Of Middle-Earth™
AppVerName=History Of Middle-Earth: BFME III
AppId={{1672F537-766B-4C4A-8B98-89AF90CDAC34}
AppVersion=1.0
AppPublisher=Repack - Herald of the Ring
AppPublisherURL=https://vk.com/thoakodding
AppSupportURL=https://vk.com/thoakodding
AppUpdatesURL=https://vk.com/thoakodding
DefaultDirName={sd}\Games\BFME III
DefaultGroupName=History Of Middle-Earth™ BFME III Repack by Herald of the Ring
OutputBaseFilename=setup
Compression=lzma2
DisableDirPage=auto
DisableProgramGroupPage=auto
AllowNoIcons=yes
InfoBeforeFile=embedded\InfoBefore.rtf
InfoAfterFile=embedded\InfoAfter.rtf
WizardImageFile=embedded\WizardImage0.bmp
WizardSmallImageFile=embedded\WizardSmallImage0.bmp

[Files]
Source: "{app}\Readme.txt"; DestDir: "{app}"; MinVersion: 0.0,1.0;
Source: "{app}\info.rtf"; DestDir: "{app}"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini"; DestDir: "{userappdata}\My Battle for Middle-earth(tm) II Files"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini"; DestDir: "{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My The History Of Ages™ Mod Files\Options.ini"; DestDir: "{userappdata}\My The History Of Ages™ Mod Files"; MinVersion: 0.0,1.0;
Source: "splash.png"; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression
Source: ISAdvSplash.dll; DestDir: {tmp}; Flags: ignoreversion dontcopy nocompression


Source: "ISAdvSplash.dll"; Flags: dontcopy;
Source: "Splash.png"; Flags: dontcopy;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

Код:
const
  BandedSwirlEffect = 1;
  BlindEffect = 2;
  BloodEffect = 3;
  CircleEffect = 4;
  MagnifyEffect = 5;
  CrumpleEffect = 6;
  DissolveEffect = 7;
  DropEffect = 8;
  FadeEffect = 9;
  BrightEffect = 10;
  PixelateEffect = 11;
  BlurEffect = 12;
  WiggleEffect = 13;
  ShapeEffect = 14;
  RippleEffect = 15;
  RotateCrumpleEffect = 16;
  SaturateEffect = 17;
  SlideEffect = 18;
  SwirlEffect = 19;
  WaterEffect = 20;
  WaveEffect = 21;
  LineEffect = 22;

procedure Splash(ImageFile: PAnsiChar; Effect, InTime, ShowTime, OutTime: Integer);
  external 'Splash@files:ISAdvSplash.dll stdcall';
function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL;
  external 'ShowWindow@user32.dll stdcall';

var DLLHandle:integer;

function InitializeSetup:Boolean;
var
  ErrorCode: Integer;
begin
  ExtractTemporaryFile('splash.png');
  DLLHandle:= LoadDLL(ExpandConstant('{tmp}\ISAdvSplash.dll') , ErrorCode);
if (DLLHandle > 0) then
begin
  ShowWindow(Application.Handle, SW_HIDE);
  Splash(ExpandConstant('{tmp}\splash.png'),3,1000,1000,1000);
  ShowWindow(Application.Handle, SW_SHOW);
end;
  Result:= True;
end;

procedure DeinitializeSetup2;
begin
if DLLHandle > 0 then
begin
  FreeDLL(DLLHandle);
  DeleteFile(ExpandConstant('{tmp}\ISAdvSplash.dll'));
  WizardForm.Free;
end;
end;


type
  HDC = LongWord;

function GetDC(HWND: hWnd): HDC; external 'GetDC@user32.dll stdcall';
function GetDeviceCaps(HDC: HDC; Index: Integer): Integer; external 'GetDeviceCaps@gdi32.dll stdcall';
function ReleaseDC(HWND: hWnd; DC: HDC): Integer; external 'ReleaseDC@user32.dll stdcall';

function GetMonitorInfo: TPoint;
var
  DC: HDC;
  Screen, null: TPoint;
begin
  Result:=null;
  DC:=GetDC(MainForm.Handle);
  Screen.x:=GetDeviceCaps(DC, 08);
  Screen.y:=GetDeviceCaps(DC, 10);
  if (Screen.x <> 0) and (Screen.y <> 0) then Result:=Screen;
  ReleaseDC(MainForm.Handle, DC);
end;

function SetResolutionInINI(FileName: PAnsiChar): Boolean;
var
  s: AnsiString;
  Screen: TPoint;
  i, b, e: Integer;
  ErrCheck: Boolean;
begin
  Result:=False;
  if not LoadStringFromFile(FileName, s) then Exit;
  if Pos('Resolution', s) <> 0 then begin
    for i:=Pos('Resolution', s) + Length('Resolution') to Length(s)-1 do begin
      if (s[i] = '=') and ErrCheck then Exit;
      if (s[i] = '=') and not ErrCheck then begin
        ErrCheck:=True;
        b:=i;
      end;
      if s[i] = #13 then begin
        e:=i;
        Break;
      end;
    end;
    Screen:=GetMonitorInfo;
    Result:=SaveStringToFile(FileName, Copy(s, 0, b)+' '+IntToStr(Screen.x)+' '+IntToStr(Screen.y)+Copy(s, e, Length(s)-e-1), False);
  end;
end;

procedure InitializeWizard1;
begin
  SetResolutionInINI(ExpandConstant('{src}\Options.ini'));
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini'));
  end;
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini'));
  end;
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My The History Of Ages™ Mod Files\Options.ini'));
  end;
end;


var
  GameKey: array of String;

function AddKey(Key: String): Boolean;
var
  Ind: Integer;
begin
  Ind:=GetArrayLength(GameKey);
  SetArrayLength(GameKey, Ind+1);
  GameKey[Ind]:=Key;
end;

function GetRandomKey(Param: String): String;
var
  Count: Integer;
begin
  Count:=GetArrayLength(GameKey);
  Result:=GameKey[Random(Count)];
end;

function MyRand(Param: string): string;
begin
  Result := Format('%.2d', [Random(StrToInt(Param))]);
end;

procedure InitializeWizard2;
begin
  AddKey('1B4CC5AFS3BUQSZMKSDD');
  AddKey('2HIVRNBRUVIRN3VJIWEI');
  AddKey('GNWE6RJ2XECXKJ5QEDWF');
  AddKey('2VNBE07L6SZWIHR81X4Q');
  AddKey('IYVD023U6XNPEQR5LMC9');
  AddKey('1ESU73IFGVDQ8A52X90R'); 
  AddKey('CPN98KLDYXS571BJMG4F'); 
  AddKey('H2TJPRM7SQ1I4KO9VYBX'); 
  AddKey('A4GQW3ZMPDSCR72FBEKO'); 
  AddKey('Z4JYD1MU75KIPTSLBC30'); 
  AddKey('T2LKE5A7GDJ6NWBVU384'); 
  AddKey('ATZPIL7BSYHRMND32KVE'); 
  AddKey('WYE0ID4KS3GMH9RFOBVT'); 
  AddKey('OMW716IB3ZKAFNPHDQ0T'); 
  AddKey('XFQB0IRALCTP7M49652J'); 
  AddKey('74T3JRYQ6PXKGM510ZL9'); 
  AddKey('5W1CTMRDPQ4BLZE0OAIV'); 
  AddKey('7IWS2VNK4BFJMQOUA19X'); 
  AddKey('CNLV1ZFWYBM6DHXKJP0S'); 
  AddKey('DLRSHNE697MUJTOF413I'); 
  AddKey('5K64NC7O1WTDXME8S3B2'); 
  AddKey('QCSKH07ETU9D4ZY65213'); 
  AddKey('0BSEDWFMT23VLQPY4Z8C'); 
  AddKey('6OTQXYSBZDLI18VNAWM3'); 
  AddKey('NGT5AZ3IO0LU6DK4WV89'); 
  AddKey('AYS4QDNTGK6RBV5F0JZO'); 
  AddKey('H4V10GNAQ9R7PUKDXFLZ'); 
  AddKey('O2X9RQZHM6VD8PNEGYU3'); 
  AddKey('NBS0P85FG1E3ULD4A6QW'); 
  AddKey('CT803M1QSLROPZ6U247I'); 
  AddKey('LS7I0XEJNA85D6P4T1CQ'); 
  AddKey('MXH24VLZ6CQKRSIF09P5'); 
  AddKey('AF0DESYBC4TVOZU6R1WJ'); 
  AddKey('WQK7SE5UY12PRVCB93GX'); 
  AddKey('TI6W92BAFOEQ5CG74HVM'); 
  AddKey('954ZBFOWMYGRJ1P2S6A8'); 
  AddKey('9GENJ7CIYKVTQ85UMOPZ'); 
  AddKey('2HIVRNBRUVIRN3VJIW{MyRand}');  
end;

procedure InitializeWizard;
begin
  InitializeWizard1;
  InitializeWizard2;
end;

//;procedure CurStepChanged(CurStep: TSetupStep);
//;var
//;    ErrCode: integer;
//;begin
//;    if (CurStep=ssDone) then
//;    begin
//;        ShellExec('open', 'https://vk.com/thoakodding', '', '', SW_SHOW, ewNoWait, ErrCode);
//;        ShellExec('open', 'https://vk.com/heraldofthering', '', '', SW_SHOW, ewNoWait, ErrCode);
//;    end;
//;end;

[Registry]
Root: HKLM; Subkey: "Software\Electronic Arts"; MinVersion: 0.0,1.0; Flags: createvalueifdoesntexist uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts"; MinVersion: 0.0,1.0; Flags: createvalueifdoesntexist uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Language"; ValueType: String; ValueData: "russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "$10000"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "My Battle for Middle-earth(tm) II Files"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Version"; ValueType: Dword; ValueData: "$10006"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Battle for Middle-earth II\ergc"; ValueType: String; ValueData: "{code:GetRandomKey}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Language"; ValueType: String; ValueData: "russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "$20000"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "My The Lord of the Rings, The Rise of the Witch-king Files"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Version"; ValueType: Dword; ValueData: "$20001"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\ergc"; ValueType: String; ValueData: "{code:GetRandomKey}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "InstallPath"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "Language"; ValueType: String; ValueData: "russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "MapPackVersion"; ValueType: Dword; ValueData: "$30000"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "UseLocalUserMaps"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "UserDataLeafName"; ValueType: String; ValueData: "My The History Of Ages™ Mod Files"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™"; ValueName: "Version"; ValueType: Dword; ValueData: "$30001"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\Electronic Arts\The History Of Ages™\ergc"; ValueType: String; ValueData: "{code:GetRandomKey}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II\1.0"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Battle for Middle-earth™ II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II\1.0"; ValueName: "Language"; ValueType: Dword; ValueData: "$10"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II\1.0"; ValueName: "LanguageName"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "CacheSize"; ValueType: String; ValueData: "5441287168"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Battle for Middle-earth™ II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Install Dir"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Language"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Product GUID"; ValueType: String; ValueData: "{{2A9F95AB-65A3-432c-8631-B8BC5BF7477A}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Region"; ValueType: String; ValueData: "NorthAmerica"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Registration"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\Electronic Arts\The Battle for Middle-earth II\ergc"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "Suppression Exe"; ValueType: String; ValueData: "rtsi.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Battle for Middle-earth II"; ValueName: "SwapSize"; ValueType: String; ValueData: "0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™\1.0"; ValueName: "DisplayName"; ValueType: String; ValueData: "The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™\1.0"; ValueName: "Language"; ValueType: Dword; ValueData: "$10"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™\1.0"; ValueName: "LanguageName"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "CacheSize"; ValueType: String; ValueData: "3139187712"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "DisplayName"; ValueType: String; ValueData: "The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Install Dir"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Language"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; MinVersion: 0.0,1.0;   
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Product GUID"; ValueType: String; ValueData: "{{FF29EB11-AA54-4E5C-B0DF-B9C7FF84CDB7}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Region"; ValueType: String; ValueData: "NorthAmerica"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Registration"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\Electronic Arts\The History Of Ages™\ergc"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "Suppression Exe"; ValueType: String; ValueData: "rtsi.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The History Of Ages™"; ValueName: "SwapSize"; ValueType: String; ValueData: "0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\1.0"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Rise of the Witch-king™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\1.0"; ValueName: "Language"; ValueType: Dword; ValueData: "$10"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\1.0"; ValueName: "LanguageName"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "CacheSize"; ValueType: String; ValueData: "3139187712"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "DisplayName"; ValueType: String; ValueData: "The Rise of the Witch-king™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Install Dir"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Language"; ValueType: String; ValueData: "Russian"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Locale"; ValueType: String; ValueData: "ru"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Product GUID"; ValueType: String; ValueData: "{{B931FB80-537A-4600-00AD-AC5DEDB6C25B}"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Region"; ValueType: String; ValueData: "NorthAmerica"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Registration"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king\ergc"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "Suppression Exe"; ValueType: String; ValueData: "rtsi.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "Software\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; ValueName: "SwapSize"; ValueType: String; ValueData: "0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\THOA.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Battle for Middle-earth II"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Restart"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The Lord of the Rings, The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\lotrbfme2ep1.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "DirectX Installed"; ValueType: Dword; ValueData: "$0"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Game Registry"; ValueType: String; ValueData: "SOFTWARE\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Path"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueName: "Installed"; ValueType: Dword; ValueData: "$1"; MinVersion: 0.0,1.0;
Root: HKLM; Subkey: "SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\THOA.exe"; ValueType: String; ValueData: "{app}\Electronic Arts\The History Of Ages™\THOA.exe"; MinVersion: 0.0,1.0;

[Run]
Filename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.exe"; Description: "{cm:LaunchProgram,The History Of Ages™}"; MinVersion: 0.0,1.0; Flags: postinstall skipifsilent nowait
Filename: "{app}\Readme.txt"; Description: "Прочитать гайд для игры по сети"; MinVersion: 0.0,1.0; Flags: shellexec postinstall skipifsilent nowait
Filename: "https://vk.com/thoakodding"; Flags: shellexec runasoriginaluser postinstall; Description: "Разработчики HOME"
Filename: "https://vk.com/heraldofthering"; Flags: shellexec runasoriginaluser postinstall; Description: "Создатели RePack."

[Icons]
Name: "{group}\The Battle for Middle-earth II"; Filename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.ico"; MinVersion: 0.0,1.0;
Name: "{group}\The Rise of the Witch-king"; Filename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.ico"; MinVersion: 0.0,1.0;
Name: "{group}\The History Of Ages™ Launcher"; Filename: "{app}\Electronic Arts\The History Of Ages™\launcher.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\THOA.ico"; MinVersion: 0.0,1.0;
Name: "{group}\The History Of Ages™ GameRanger"; Filename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.exe"; WorkingDir: "{app}\BFME III"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.ico"; MinVersion: 0.0,1.0;
Name: "{group}\Удалить игру"; Filename: "{uninstallexe}"; WorkingDir: "{app}"; MinVersion: 0.0,1.0;
Name: "{group}\Наша группа Вконтакте"; Filename: "https://vk.com/thoakodding"; MinVersion: 0.0,1.0;
Name: "{commondesktop}\CDKeyFixer"; Filename: "{app}\Electronic Arts\CDKeyFixer (Tools Modding)\CDKeyFixer\CDKeyFixer.exe"; WorkingDir: "{app}\Electronic Arts\CDKeyFixer (Tools Modding)\CDKeyFixer"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The Battle for Middle-earth II"; Filename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.exe"; IconFilename: "{app}\Electronic Arts\The Lord of the Rings - The Battle for Middle-earth II\lotrbfme2.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The Rise of the Witch-king"; Filename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.exe"; IconFilename: "{app}\Electronic Arts\The Rise of the Witch-king\lotrbfme2ep1.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The History Of Ages™ Launcher"; Filename: "{app}\Electronic Arts\The History Of Ages™\launcher.exe"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\THOA.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;
Name: "{commondesktop}\The History Of Ages™ GameRanger"; Filename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.exe"; IconFilename: "{app}\Electronic Arts\The History Of Ages™\lotrbfme2ep1.ico"; Tasks: desktopicon; MinVersion: 0.0,1.0;

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; MinVersion: 0.0,1.0;
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; MinVersion: 0.0,1.0; OnlyBelowVersion: 0.0,1.0;

[UninstallDelete]
Type: files; Name: "{app}\*.ini";
Type: files; Name: "{app}\Log\*.log";
Type: dirifempty; Name: "{app}\Log";

[CustomMessages]
russian.NameAndVersion=%1, версия %2
russian.AdditionalIcons=Дополнительные значки:
russian.CreateDesktopIcon=Создать значок на &Рабочем столе
russian.CreateQuickLaunchIcon=Создать значок в &Панели быстрого запуска
russian.ProgramOnTheWeb=Гайд %1 в интернете
russian.UninstallProgram=Деинсталлировать %1
russian.LaunchProgram=Запустить %1
russian.AssocFileExtension=Св&язать %1 с файлами, имеющими расширение %2
russian.AssocingFileExtension=Связывание %1 с файлами %2...
russian.AutoStartProgramGroupDescription=Автозапуск:
russian.AutoStartProgram=Автоматически запускать %1
russian.AddonHostProgramNotFound=%1 не найден в указанной вами папке.%n%nВы всё равно хотите продолжить?

[Languages]
Name: "russian"; MessagesFile: "embedded\russian.isl";

[/SPOILER]
 

AlexZetCrow

Новичок
А зачем так мучится и выдумывать, когда можно тот же:

Запустить на Postinstall и пользователь сам заменит ключ на ему удобный, чем писать получение рандом ключа от программы.


Вот ниже приведена функция генератора ключей
и случайный выбор ключа из имеющихся
var
GameKey: array of String;

function AddKey(Key: String): Boolean;
var
Ind: Integer;
begin
Ind:=GetArrayLength(GameKey);
SetArrayLength(GameKey, Ind+1);
GameKey[Ind]:=Key;
end;

function GetRandomKey(Param: String): String; // Тот самый ключ что подставляется GetRandomKey
var
Count: Integer;
begin
Count:=GetArrayLength(GameKey);
Result:=GameKey[Random(Count)];
end;

function MyRand(Param: string): string; //Ввел переменную, она будет работать в конченом или же нет?
begin
Result := Format('%.2d', [Random(StrToInt(Param))]);
end;

procedure InitializeWizard2;
begin
AddKey('1B4CC5AFS3BUQSZMKSDD');
AddKey('2HIVRNBRUVIRN3VJIWEI');
AddKey('GNWE6RJ2XECXKJ5QEDWF');
AddKey('2VNBE07L6SZWIHR81X4Q');
AddKey('IYVD023U6XNPEQR5LMC9');
AddKey('1ESU73IFGVDQ8A52X90R');
AddKey('CPN98KLDYXS571BJMG4F');
AddKey('H2TJPRM7SQ1I4KO9VYBX');
AddKey('A4GQW3ZMPDSCR72FBEKO');
AddKey('Z4JYD1MU75KIPTSLBC30');
AddKey('T2LKE5A7GDJ6NWBVU384');
AddKey('ATZPIL7BSYHRMND32KVE');
AddKey('WYE0ID4KS3GMH9RFOBVT');
AddKey('OMW716IB3ZKAFNPHDQ0T');
AddKey('XFQB0IRALCTP7M49652J');
AddKey('74T3JRYQ6PXKGM510ZL9');
AddKey('5W1CTMRDPQ4BLZE0OAIV');
AddKey('7IWS2VNK4BFJMQOUA19X');
AddKey('CNLV1ZFWYBM6DHXKJP0S');
AddKey('DLRSHNE697MUJTOF413I');
AddKey('5K64NC7O1WTDXME8S3B2');
AddKey('QCSKH07ETU9D4ZY65213');
AddKey('0BSEDWFMT23VLQPY4Z8C');
AddKey('6OTQXYSBZDLI18VNAWM3');
AddKey('NGT5AZ3IO0LU6DK4WV89');
AddKey('AYS4QDNTGK6RBV5F0JZO');
AddKey('H4V10GNAQ9R7PUKDXFLZ');
AddKey('O2X9RQZHM6VD8PNEGYU3');
AddKey('NBS0P85FG1E3ULD4A6QW');
AddKey('CT803M1QSLROPZ6U247I');
AddKey('LS7I0XEJNA85D6P4T1CQ');
AddKey('MXH24VLZ6CQKRSIF09P5');
AddKey('AF0DESYBC4TVOZU6R1WJ');
AddKey('WQK7SE5UY12PRVCB93GX');
AddKey('TI6W92BAFOEQ5CG74HVM');
AddKey('954ZBFOWMYGRJ1P2S6A8');
AddKey('9GENJ7CIYKVTQ85UMOPZ');
AddKey('2HIVRNBRUVIRN3VJIW{MyRand}');
//генератор на конце 2 случайный числа, если я правильно сделал скажите генерируется с MyRand
end;
 

AlexZetCrow

Новичок
А зачем так мучится и выдумывать, когда можно тот же:

Запустить на Postinstall и пользователь сам заменит ключ на ему удобный, чем писать получение рандом ключа от программы.
Изините меня конечно, но за 5 лет"не цензурная лексика" с модом THOA и всего что я там натерпелся как главный админ и разработчик последних 5 лет, я хочу сказать что юзеры тупые.. и я тоже глуп.. Но если я ввязался за это дело, хочется максимум комфорта для игрока, чтоб пользователь вообще не знал, что такое ключи как их менять, установил и пошел играть.
Я и так в моде избавился от ключей, щас неделю уже сижу за Inno Setup пытаюсь понять что куда и где и честно говоря я не знаю откуда скачать Inno Setup Advanced Splash https://krinkels.org/threads/inno-setup-advanced-splash.2680/
У меня ведь попросту не получается покамись поставить ISAdvSplash.dll или же isgsg.dll

Не получается добавить или активировать splash.png
Ну и звук добавить.. в общем сел с dll надолго
 

AlexZetCrow

Новичок
@AlexZetCrow, хммм, видимо вы пытаетесь скомпилировать скрипт, вытащенный из какого-то инсталлятора.
Ну очевидно, что функция должна иметь следующую сигнатуру
Код:
function GetRandomKey(): String;
begin
  // тут что-то делаем
end;
Возвращать должна какой-то цифровой ключ для игры из предустановленного в скрипте набора, возможно использовались заранее сгенерированные ключи.
Типа такого
Код:
25KT-D6UV-V2AZ-7V2J-6RLD
Когда у вас будет больше данных как это должно работать, и набор готовых ключей - можно будет сделать и функцию, для выбора случайного ключа из набора

Всё верно я делал по принципу подобия, начинал разбираться, а как там у других. Теперь знаю что чистый паскаль не нужен, нужны верные функции.

На данный момент я не могу победить splash.png и не знаю как добавить фоновые 2 картинки и музыку фоном.
Ещё пытаюсь разобраться со сменой языка, чтоб Инсталлер работал на Английском и Русском языках.
 

AlexZetCrow

Новичок
Не знаю, может вам пригодится, я для игры, именно разрешения Option.ini смог прописать на все три игры, чтоб разрешение экрана подгонялось под пользовательский. Позаимствовал часть кода на этом сайте, строчки некоторые вписал.

Ссылка на подобное сообщение в другой теме как и подробное решение проблемы тут

[Files]
Source: "{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini"; DestDir: "{userappdata}\My Battle for Middle-earth(tm) II Files"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini"; DestDir: "{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files"; MinVersion: 0.0,1.0;
Source: "{userappdata}\My The History Of Ages™ Mod Files\Options.ini"; DestDir: "{userappdata}\My The History Of Ages™ Mod Files"; MinVersion: 0.0,1.0;


Код:
type
  HDC = LongWord;

function GetDC(HWND: hWnd): HDC; external 'GetDC@user32.dll stdcall';
function GetDeviceCaps(HDC: HDC; Index: Integer): Integer; external 'GetDeviceCaps@gdi32.dll stdcall';
function ReleaseDC(HWND: hWnd; DC: HDC): Integer; external 'ReleaseDC@user32.dll stdcall';

function GetMonitorInfo: TPoint;
var
  DC: HDC;
  Screen, null: TPoint;
begin
  Result:=null;
  DC:=GetDC(MainForm.Handle);
  Screen.x:=GetDeviceCaps(DC, 08);
  Screen.y:=GetDeviceCaps(DC, 10);
  if (Screen.x <> 0) and (Screen.y <> 0) then Result:=Screen;
  ReleaseDC(MainForm.Handle, DC);
end;

function SetResolutionInINI(FileName: PAnsiChar): Boolean;
var
  s: AnsiString;
  Screen: TPoint;
  i, b, e: Integer;
  ErrCheck: Boolean;
begin
  Result:=False;
  if not LoadStringFromFile(FileName, s) then Exit;
  if Pos('Resolution', s) <> 0 then begin
    for i:=Pos('Resolution', s) + Length('Resolution') to Length(s)-1 do begin
      if (s[i] = '=') and ErrCheck then Exit;
      if (s[i] = '=') and not ErrCheck then begin
        ErrCheck:=True;
        b:=i;
      end;
      if s[i] = #13 then begin
        e:=i;
        Break;
      end;
    end;
    Screen:=GetMonitorInfo;
    Result:=SaveStringToFile(FileName, Copy(s, 0, b)+' '+IntToStr(Screen.x)+' '+IntToStr(Screen.y)+Copy(s, e, Length(s)-e-1), False);
  end;
end;

procedure InitializeWizard;
begin
  SetResolutionInINI(ExpandConstant('{src}\Options.ini')); 
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini'));
  end;
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini'));
  end;
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My The History Of Ages™ Mod Files\Options.ini'));
  end;
end;
 

AlexZetCrow

Новичок
Остались вопросы по поводу правильности сборки
1. Все исполняемые файлы и библиотеки (dll bmp png) должны быть в одной корневой папке для правильной компиляции и работы скриптов?
2. Как сделать прозрачное лого splash.png перед началом загрузки (пробовал здесь приведенные )
3. Как добавить звук, рабочий.. Либо не могу найти dll отвечающие за музыку, либо не срабатывает код, вплоть до ошибок.
4. Фоновые картины на экране, приветственная, при ходе установки и в конце.
 

Вложения

AlexZetCrow

Новичок
Пример Функции "RandomKey"
Тоже интересное получается, хм
А можно ли как-то сделать скрипт позволяющий генерировать подобное внутри самого InnoSetup ? ну я про именно не выбор ключа, а полноценную генерацию ключа, на паскале нашел пару функций, но не смог их адаптировать.
 

Andreo Fadio

Старожил
Все исполняемые файлы и библиотеки (dll bmp png) должны быть в одной корневой папке для правильной компиляции и работы скриптов?
не обязательно, куда положите и как путь к этому укажете в нужных местах
Как сделать прозрачное лого splash.png перед началом загрузки
может с помощью такого: Ссылка
или про что именно?
Как добавить звук, рабочий.. Либо не могу найти dll отвечающие за музыку, либо не срабатывает код, вплоть до ошибок.
Ссылка
 

AlexZetCrow

Новичок
не обязательно, куда положите и как путь к этому укажете в нужных местах

может с помощью такого: Ссылка
или про что именно?

Ссылка
А как избавиться от такого ?
У меня выбор кнопок, из текста состоящие, перебивают картинку
Не могу добавить им прозрачность
1627581688152.png
 

Andreo Fadio

Старожил
У меня выбор кнопок, из текста состоящие, перебивают картинку
Не могу добавить им прозрачность
Вы используете элемент TNewCheckListBox размещая на нем нужные задачи, а данный элемент не поддерживает свойство прозрачности.
Или уменьшайте и размещайте элемент, как нибудь на странице, или вам в тему botva2.dll за примером создания прозрачного кастомного чеклиста.
 

AlexZetCrow

Новичок
Вы используете элемент TNewCheckListBox размещая на нем нужные задачи, а данный элемент не поддерживает свойство прозрачности.
Или уменьшайте и размещайте элемент, как нибудь на странице, или вам в тему botva2.dll за примером создания прозрачного кастомного чеклиста.

Тогда стоит пойти за этим в botva2.dll спасибо )
интересно будет доделать до ума
Ещё раз спасибо
 

AlexZetCrow

Новичок
Вы используете элемент TNewCheckListBox размещая на нем нужные задачи, а данный элемент не поддерживает свойство прозрачности.
Или уменьшайте и размещайте элемент, как нибудь на странице, или вам в тему botva2.dll за примером создания прозрачного кастомного чеклиста.

Извините, не подскажите, а где можно обратиться за явным таким примером и ещё один вопрос
вот у меня есть два

Код:
procedure CurStepChanged(CurStep: TSetupStep);
begin
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini'));
  end;
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini'));
  end;
  case CurStep of
    ssDone: SetResolutionInINI(ExpandConstant('{userappdata}\My The History Of Ages™ Mod Files\Options.ini'));
  end;
end;


Код:
procedure CurStepChanged(CurStep: TSetupStep);
var
    ErrCode: integer;
begin
    if (CurStep=ssDone) then
    begin
        ShellExec('open', 'https://vk.com/thoakodding', '', '', SW_SHOW, ewNoWait, ErrCode);
        ShellExec('open', 'https://vk.com/heraldofthering', '', '', SW_SHOW, ewNoWait, ErrCode);
    end;
end;
И как мне их объединить ?
По типу

procedure InitializeWizard;
begin
InitializeWizard1;
InitializeWizard2;
InitializeWizard3;
InitializeWizard4;
InitializeWizard5;
end;

не получается, т.е. подобным образом как InitializeWizard я не могу объединить ?
 

Andreo Fadio

Старожил
@AlexZetCrow,
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrCode: integer;
begin
if (CurStep=ssDone) then
begin
ShellExec('open', 'https://vk.com/thoakodding', '', '', SW_SHOW, ewNoWait, ErrCode);
ShellExec('open', 'https://vk.com/heraldofthering', '', '', SW_SHOW, ewNoWait, ErrCode);
SetResolutionInINI(ExpandConstant('{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini'));
SetResolutionInINI(ExpandConstant('{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini'));
SetResolutionInINI(ExpandConstant('{userappdata}\My The History Of Ages™ Mod Files\Options.ini'));
end;
end;

И не надо по пять раз задавать ssDone пишете под 1 заданный раз
 

AlexZetCrow

Новичок
@AlexZetCrow,
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrCode: integer;
begin
if (CurStep=ssDone) then
begin
ShellExec('open', 'https://vk.com/thoakodding', '', '', SW_SHOW, ewNoWait, ErrCode);
ShellExec('open', 'https://vk.com/heraldofthering', '', '', SW_SHOW, ewNoWait, ErrCode);
SetResolutionInINI(ExpandConstant('{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini'));
SetResolutionInINI(ExpandConstant('{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini'));
SetResolutionInINI(ExpandConstant('{userappdata}\My The History Of Ages™ Mod Files\Options.ini'));
end;
end;

И не надо по пять раз задавать ssDone пишете под 1 заданный раз
Спасибо, помогло, работает как надо ))



1627626210816.png
1627626230238.png
1627626244290.png
1627626258291.png
[/Code][/SPOILER]

Результаты моей работы и вашей помощи. Признателен )

А ещё вопрос ,касательно этой процедуры

У меня имеется


Код:
procedure CurStepChanged(CurStep: TSetupStep);
#ifdef memory
Name: "memory"; Description: "Приоритет установки"; Types: full; MinVersion: 0.0,5.0; Flags: fixed
Name: "memory\low"; Description: "Низкий (Используется ~25% свободной ОЗУ)"; MinVersion: 0.0,5.0; Flags: exclusive;
Name: "memory\mid"; Description: "Средний (Используется ~50% свободной ОЗУ)"; MinVersion: 0.0,5.0; Flags: exclusive;
Name: "memory\high"; Description: "Высокий (Используется ~75% свободной ОЗУ)"; MinVersion: 0.0,5.0; Flags: exclusive;
#endif
#endif
и


Код:
procedure CurStepChanged(CurStep: TSetupStep);
var
ErrCode: integer;
begin
if (CurStep=ssDone) then
begin
ShellExec('open', 'https://vk.com/thoakodding', '', '', SW_SHOW, ewNoWait, ErrCode);
ShellExec('open', 'https://vk.com/heraldofthering', '', '', SW_SHOW, ewNoWait, ErrCode);
SetResolutionInINI(ExpandConstant('{userappdata}\My Battle for Middle-earth(tm) II Files\Options.ini'));
SetResolutionInINI(ExpandConstant('{userappdata}\My The Lord of the Rings, The Rise of the Witch-king Files\Options.ini'));
SetResolutionInINI(ExpandConstant('{userappdata}\My The History Of Ages™ Mod Files\Options.ini'));
end;
end;
procedure CurStepChanged(CurStep: TSetupStep); - как объединяются данные скрипты, как прописать последовательность действий, т.е. чтобы все эти функции срабатывали в одной процедуре, имею в виду какие-то соединяющие команды. Если можно то с примером, чтоб я понимал где читать или как прописывается.

А ещё такой вопрос:

Как мне подставить туда функцию установки определенных файлов?
Если человек выбрал русский текст и английскую озвучку, то лишь определенные файлы выбранные пользователем должны установиться, выбор имеется, как прописать установку самих файлом не нашел.

В компонентах очень интересно сидеть, но хотелось бы уже добить Выборку приоритетности установки, потому как собираюсь максимально сжать все файлы ну и конечно же выбор языка + дополнительные материалы, вот сижу покамись на этом ))
На данном этапе я доволен своей работой
CompText=Выбор языка игры
Loc_TextRus_VoiceRus=Русский текст и русская озвучка
Loc_TextRus_VoiceEng=Русский текст и английская озвучка
Loc_TextEng_VoiceRus=Английский текст и русская озвучка
Loc_TextEng_VoiceEng=Английский текст и английская озвучка

[Components]
Name: LocText; Description: "{cm:CompText}"; Flags: Fixed; Types: full;
Name: textRu\rus; Description: "{cm:Loc_TextRus_VoiceRus}"; Flags: exclusive; Types: full;
//компонент 1
Name: voiceEn\rus; Description: "{cm:Loc_TextRus_VoiceEng}"; Flags: exclusive; Types: full;
//компонент 3
Name: voiceRu\eng; Description: "{cm:Loc_TextEng_VoiceRus}"; Flags: exclusive; Types: full;
//компонент 2
Name: textEn\eng; Description: "{cm:Loc_TextEng_VoiceEng}"; Flags: exclusive; Types: full;

Код:
//
function cm(s: String): String;
begin
  Result:= ExpandConstant('{cm:'+s+'}');
end;

function Check_l(lang: string): boolean;
begin
  Result := (ActiveLanguage = lang);
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  if (CurPageID = wpSelectComponents) then
  begin
    with WizardForm.ComponentsList do
    begin
      Checked[Items.IndexOf(cm('Loc_TextRus_VoiceRus'))]:= Check_l('TextRus_VoiceRus');
      Checked[Items.IndexOf(cm('Loc_TextRus_VoiceEng'))]:= Check_l('TextRus_VoiceEng');
      Checked[Items.IndexOf(cm('Loc_TextEng_VoiceRus'))]:= Check_l('TextEng_VoiceRus');
      Checked[Items.IndexOf(cm('Loc_TextEng_VoiceEng'))]:= Check_l('TextEng_VoiceEng');
    end;
  end;
end;

//
[/SPOILER]
 

Andreo Fadio

Старожил
У меня имеется
То что имеется у вас бредом выглядит. Код из секции компонентов писать в секцию код - глупо.

А ещё такой вопрос:

Как мне подставить туда функцию установки определенных файлов?
Если человек выбрал русский текст и английскую озвучку, то лишь определенные файлы выбранные пользователем должны установиться, выбор имеется, как прописать установку самих файлом не нашел.
Скачайте русскую справку и посмотрите там внятно написано. Для языков есть параметр - languages, который блокирует установку файлов, пропись данных, отображение компонентов и задач и прочего если разбираетесь при выборе альтернативного языка выбранному. И в секцию код ничего писать не надо. Для перевода параметров, компонентов, задач - есть простой вариант через секцию [CustomMessages]под свой конкретный язык
 
Последнее редактирование:

AlexZetCrow

Новичок
То что имеется у вас бредом выглядит. Код из секции компонентов писать в секцию код - глупо.


Скачайте русскую справку и посмотрите там внятно написано. Для языков есть параметр - languges, который блокирует установку файлов, пропись данных, отображение компонентов и задач и прочего если разбираетесь при выборе альтернативного языка выбранному. И в секцию код ничего писать не надо. Для перевода параметров, компонентов, задач - есть простой вариант через секцию [CustomMessages]под свой конкретный язык
[CustomMessages] это разве не выбор просто языка или одного файла, туда можно прописать размещение и установку нужных файлов при выборе из компонентов


"То что имеется у вас бредом выглядит. Код из секции компонентов писать в секцию код - глупо. "
Согласен не верно понял куда его применить. думал что это именно код по функционалу.
 
Сверху