I spent time searching for an answer but still can't quite figure this out.
I have this MSI file that I can run this command to silent install it.
msiexec.exe /i theapp.msi /q INSTALLDIR=C:\myapp CLIENTDATA=34542@localhost.com
With Inno, I attempted the following and my MSI will not silently install. What I do receive is this window will pop up automatically so obvious there is a probleming passing the commands to the msiexec process.
#define MyAppName "fooApp"
#define MyAppVersion "1.0"
#define MyAppPublisher "fooUser"
#define MyAppURL "http://foo.com"
#define MyAppExeName "MyProg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E633BAE8-81C7-4190-9964-D86287FAA8F4}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=no
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
ShowTasksTreeLines=True
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "D:\theapp.msi"; DestDir: " {tmp}";
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: "msiexec.exe"; Parameters: "/i /q CLIENTDATA=34542@localhost.com {tmp}\theapp.msi"""; Flags: runascurrentuser shellexec
Underneath the [Run] section if I use this line I the MSI is launched correctly in interactive mode where the user will fill in the parameters manually which I don't want the m doing.
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\theapp.msi"""
In another post, I saw someone mention to use this function but I couldn't find any sample code on how to actually use it.
function ParamStr(Index: Integer):
Thanks for any direction here.