I am trying to give my customer a silent installer. He will provide the correct .INI file based on his user's needs. The joe.ini file sets a single variable:
[SetupValues]
%INSTALLSPID%=valueFromIniFileForTesting
In a command shell, I run: Pimm_4.4.0.0.exe /S:joe.ini
However, I always set the default value for this variable, no matter how I try to run it. I added this code to my installer to debug, and it verifies that the INI file has no impact. How do I fix this?
My startup code:
local installSPID = SessionVar.Expand("%INSTALLSPID%");
if _SilentInstall then
SetupData.WriteToLogFile("Info\tThe setup is running silently\r\n", true);
else
SetupData.WriteToLogFile("Info\tThe setup is running interactively\r\n", true);
end
SetupData.WriteToLogFile("Info\tThe spid is set to: "..installSPID.."\r\n", true);
local sArgs = "";
for i,v in pairs(_CommandLineArgs) do
sArgs = sArgs .. v .. " ";
end
SetupData.WriteToLogFile("Info\tCommand line args: " .. sArgs .. "\r\n", true);
Application.Exit(0);
From the log file:
[01/11/2019 11:57:05] Notice Start project event: On Startup
[01/11/2019 11:57:05] Info The setup is running silently
[01/11/2019 11:57:05] Info The spid is set to: DEFAULT
[01/11/2019 11:57:05] Info Command line args: C:\Users\Steve\AppData\Local\Temp\_ir_sf_temp_20\i rsetup.exe /S:joe.ini __IRCT:2
[01/11/2019 11:57:05] Success Run project event: On Startup
Thanks for any help.
[SetupValues]
%INSTALLSPID%=valueFromIniFileForTesting
In a command shell, I run: Pimm_4.4.0.0.exe /S:joe.ini
However, I always set the default value for this variable, no matter how I try to run it. I added this code to my installer to debug, and it verifies that the INI file has no impact. How do I fix this?
My startup code:
local installSPID = SessionVar.Expand("%INSTALLSPID%");
if _SilentInstall then
SetupData.WriteToLogFile("Info\tThe setup is running silently\r\n", true);
else
SetupData.WriteToLogFile("Info\tThe setup is running interactively\r\n", true);
end
SetupData.WriteToLogFile("Info\tThe spid is set to: "..installSPID.."\r\n", true);
local sArgs = "";
for i,v in pairs(_CommandLineArgs) do
sArgs = sArgs .. v .. " ";
end
SetupData.WriteToLogFile("Info\tCommand line args: " .. sArgs .. "\r\n", true);
Application.Exit(0);
From the log file:
[01/11/2019 11:57:05] Notice Start project event: On Startup
[01/11/2019 11:57:05] Info The setup is running silently
[01/11/2019 11:57:05] Info The spid is set to: DEFAULT
[01/11/2019 11:57:05] Info Command line args: C:\Users\Steve\AppData\Local\Temp\_ir_sf_temp_20\i rsetup.exe /S:joe.ini __IRCT:2
[01/11/2019 11:57:05] Success Run project event: On Startup
Thanks for any help.
Comment