wic.iss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. ; requires Windows Server 2003, Windows Server 2003 R2 Datacenter Edition (32-Bit x86), Windows Server 2003 R2 Enterprise Edition (32-Bit x86), Windows Server 2003 R2 Standard Edition (32-bit x86), Windows XP Service Pack 2
  2. [CustomMessages]
  3. wic_title=Windows Imaging Component
  4. wic_size=1.2 MB
  5. [Code]
  6. const
  7. wic_url = 'http://download.microsoft.com/download/f/f/1/ff178bb1-da91-48ed-89e5-478a99387d4f/wic_x86_';
  8. wic_url_x64 = 'http://download.microsoft.com/download/6/4/5/645fed5f-a6e7-44d9-9d10-fe83348796b0/wic_x64';
  9. function GetConvertedLanguageID(): string;
  10. begin
  11. Result := 'enu';
  12. case ActiveLanguage() of
  13. 'zh': // Chinese
  14. Result := 'chs';
  15. 'de': // German
  16. Result := 'deu';
  17. 'es': // Spanish
  18. Result := 'esn';
  19. 'fr': // French
  20. Result := 'fra';
  21. 'it': // Italian
  22. Result := 'ita';
  23. 'ja': // Japanese
  24. Result := 'jpn';
  25. 'nl': // Dutch
  26. Result := 'nld';
  27. 'pt': // Portuguese
  28. Result := 'ptb';
  29. 'ru': // Russian
  30. Result := 'rus';
  31. end;
  32. end;
  33. procedure wic();
  34. begin
  35. if (not IsIA64()) then begin
  36. // only needed on Windows XP SP2 or Windows Server 2003
  37. if ((exactwinversion(5, 1) and exactwinspversion(5, 1, 2)) or (exactwinversion(5, 2))) then begin
  38. if (not FileExists(GetEnv('windir') + '\system32\windowscodecs.dll')) then
  39. AddProduct('wic' + GetArchitectureString() + '_' + GetConvertedLanguageID() + '.exe',
  40. '/q',
  41. CustomMessage('wic_title'),
  42. CustomMessage('wic_size'),
  43. GetString(wic_url, wic_url_x64, '') + GetConvertedLanguageID() + '.exe',
  44. false, false, false);
  45. end;
  46. end;
  47. end;
  48. [Setup]