1
votes

I want to create an installer for Access 2010 runtime using Inno Setup.

When I try to compile the file I get this error from Inno Setup:

File: xxxx\config.xml
Line 1:
Unrecognized parameter name ""

I have created the recommended config.xml file as follows (actually I just copied it verbatim).

config.xml file:

<Configuration Product="AccessRT">
        <Display Level="Basic" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />
        <Setting Id="SETUP_REBOOT" Value="IfNeeded" />
</Configuration>

Inno Setup file:

#include <idp.iss>

[Files]
Source: C:\Users\john.eggHeadLtd\OneDrive\blueEggShare\config.xml; \
    DestDir: {tmp}; Flags: ignoreversion

[Run]
Filename: {tmp}\AccRt.exe /extract:{tmp}\AccRT; 
#include "config.xml"
Filename: {tmp}\setup.exe; Parameters: /config {tmp}\config.xml;
Filename: {tmp}\accsp2.exe
[Code]
procedure InitializeWizard();
begin
  { Let's download two zipfiles from my website.. }
  idpaddfile('https://download.microsoft.com/download/2/6/0/260AA63A-A275-4A92-950D-CE20B490D0B9/AccessRuntime.exe',expandconstant('{tmp}\accRt.exe'));
  idpaddfile('https://download.microsoft.com/download/C/C/2/CC28BC00-1AF0-44B9-8A5D-9D8C8E4899BB/accessrtsp2010-kb2687444-fullfile-x86-en-us.exe',expandconstant('{tmp}\accSp2.exe'));

  { Start the download after the "Ready to install" screen is shown }
  idpdownloadafter(wpReady);
end;
1
Where does the {tmp}\setup.exe come from? - Martin Prikryl
Martin, I thought the {tmp}\setup.exe referred to the setup.exe file produced when the {tmp}\AccRt.exe was expanded. - Sputnik
Make sense, I was expecting that. But it's not obvious from your question. - Martin Prikryl
Also the CurStepChanged procedure does not make any sense. You just copy the two files to each other (what probably fails anyway) => I'm removing that from your question, not to confuse others. - Martin Prikryl
And the Filename: {tmp}\AccRt.exe /extract:{tmp}\AccRT; is also wrong, it should be Filename: {tmp}\AccRt.exe; Parameters: /extract:{tmp}\AccRT;, right? - Martin Prikryl

1 Answers

1
votes

First you need to extract the AccessRuntime.exe (which you download/save to {tmp}\accRt.exe):

[Run]
Filename: {tmp}\accRt.exe; Parameters: /extract:{tmp}\accRt /quiet

Then you have to run the extracted setup.exe with your configuration file:

[Files]
Source: C:\source\path\config.xml; DestDir: {tmp}

[Run]
Filename: {tmp}\accRt\setup.exe; Parameters: "/config ""{tmp}\config.xml"""

Few comments to my modifications of your code:

  • the ignoreversion flag does not have any effect for .xml files
  • You better wrap the path to the configuration file to quotes, in case {tmp} contains spaces.