Sputnik
Sputnik

Reputation: 43

Inno Setup MS Access 2010 silent install

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;

Upvotes: 1

Views: 1053

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202474

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.

Upvotes: 1

Related Questions