This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Embedding Python installation via exe file
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 22, 2017
04:58 AM
Embedding Python installation via exe file
Hi,
Our software package offers the user the option to install Python.
Python used to be included in my basic msi project as a chained MSI. However Python have now stopped providing MSIs and I therefore need to include it as an executable.
I haven't been able to add it as a "New EXE" custom action (deferred) because the Python installer complains that another installation is already in progress...
Is there any way to include the Python installer executable other than by including it as a prerequisite? Should the "New EXE" custom action work?
Thank you,
Christophe
Our software package offers the user the option to install Python.
Python used to be included in my basic msi project as a chained MSI. However Python have now stopped providing MSIs and I therefore need to include it as an executable.
I haven't been able to add it as a "New EXE" custom action (deferred) because the Python installer complains that another installation is already in progress...
Is there any way to include the Python installer executable other than by including it as a prerequisite? Should the "New EXE" custom action work?
Thank you,
Christophe
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 29, 2017
08:55 AM
It sounds to me like the new EXE from Python includes an MSI nested inside of it. That's what is throwing the error is you have one MSI already running and when you run the EXE it sounds like it is unpacking an MSI and trying to run it. Can't have two MSI files in Execute mode at the same time in this fashion.
Chad
Chad
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 29, 2017
10:01 AM
The Phyton package is created with WiX-Toolkit.
You can extract the sources with:
dark.exe python-3.6.2.exe -x .\out
Then all packages are extracted to "Out" folder.
Now you can use the different msi packages to bind to your msi.
But also take care that you include all necessary msi and msu packages and call with the correct parameters.
The msu packages are necessary for some OS to use VC14 (Visual C++ 2015) runtimes.
regards
Markus
You can extract the sources with:
dark.exe python-3.6.2.exe -x .\out
Then all packages are extracted to "Out" folder.
Now you can use the different msi packages to bind to your msi.
But also take care that you include all necessary msi and msu packages and call with the correct parameters.
The msu packages are necessary for some OS to use VC14 (Visual C++ 2015) runtimes.
regards
Markus
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 31, 2017
11:17 AM
It looks like there are around 12 extracted msi packages, and running those msi packages still did not seem to install Python correctly.
Is running an EXE custom action not possible at all?
Thanks for your replies.
Christophe
Is running an EXE custom action not possible at all?
Thanks for your replies.
Christophe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 06, 2017
01:47 PM
Christophe,
The answer is no if the Python EXE has embedded MSI.
The solution to manage this is to create a InstallShield SUITE project. This will allow you to handle 'chaining' multiple MSI packages within a single installer.
The answer is no if the Python EXE has embedded MSI.
The solution to manage this is to create a InstallShield SUITE project. This will allow you to handle 'chaining' multiple MSI packages within a single installer.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 20, 2021
02:21 PM
We need to check the current version of python installed, which I am getting using "python --version" command output from powershell custom action and installing the python in the INSTALLDIR\python folder. To get the INSTALLDIR, we can't keep it in the prereq section as user can change the folder in the UI screen of msi. And this process is giving the 1618 error. Can you provide basic overview on how to create this in SUITE project, as I didn't find any proper resources to get started.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 11, 2017
10:43 AM
I know this won't help you per se, but I thought this might be a good place to show what we did for our InstallScript project.
// Execute Python installer
//
// Returns 0 always
//
// Called by: OnMoved()
//---------------------------------------------------------------------------
function mpx_InstallPython()
STRING szExeCmd, szMessage, szCmd, szCmdLine;
NUMBER nResult, nOptions;
begin
WriteLine(glLogFile, "Starting mpx_InstallPython().");
mpx_UnregisterScriptingServices();
mpx_RegisterScriptingServices();
szExeCmd = "msiexec.exe";
//Sprintf(szMessage, "\tszExeCmd = %s", szExeCmd);
//nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
szCmd = SUPPORTDIR ^ "python-3.4.3.amd64.msi ";
//Sprintf(szMessage, "szCmd = %s", szCmd);
//nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
szCmdLine = "/i " + szCmd + "/quiet /qn ALLUSERS=1 ADDLOCAL=ALL REMOVE=PrependPath,Extensions";
Sprintf(szMessage, "\tszCmdLine = %s", szCmdLine);
nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
if (SYSINFO.nISOSL >= ISOSL_WINVISTA) then // vista, win7
LAAW_SHELLEXECUTEVERB = "runas";
endif;
nOptions = LAAW_OPTION_CHANGEDIRECTORY | LAAW_OPTION_FIXUP_PROGRAM | LAAW_OPTION_WAIT | LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_SHOW_HOURGLASS | LAAW_OPTION_HIDDEN;
nResult = LaunchApplication(szExeCmd, szCmdLine, "", SW_HIDE, LAAW_PARAMETERS.nTimeOut, nOptions);
if (nResult < 0) then
Sprintf(szMessage, "\tPython was NOT installed properly!!");
nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, SEVERE);
else
Sprintf(szMessage, "\tPython WAS installed properly.");
nResult = WriteLine(glLogFile, szMessage);
endif;
return nResult;
end;
// Execute Python installer
//
// Returns 0 always
//
// Called by: OnMoved()
//---------------------------------------------------------------------------
function mpx_InstallPython()
STRING szExeCmd, szMessage, szCmd, szCmdLine;
NUMBER nResult, nOptions;
begin
WriteLine(glLogFile, "Starting mpx_InstallPython().");
mpx_UnregisterScriptingServices();
mpx_RegisterScriptingServices();
szExeCmd = "msiexec.exe";
//Sprintf(szMessage, "\tszExeCmd = %s", szExeCmd);
//nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
szCmd = SUPPORTDIR ^ "python-3.4.3.amd64.msi ";
//Sprintf(szMessage, "szCmd = %s", szCmd);
//nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
szCmdLine = "/i " + szCmd + "/quiet /qn ALLUSERS=1 ADDLOCAL=ALL REMOVE=PrependPath,Extensions";
Sprintf(szMessage, "\tszCmdLine = %s", szCmdLine);
nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, INFORMATION);
if (SYSINFO.nISOSL >= ISOSL_WINVISTA) then // vista, win7
LAAW_SHELLEXECUTEVERB = "runas";
endif;
nOptions = LAAW_OPTION_CHANGEDIRECTORY | LAAW_OPTION_FIXUP_PROGRAM | LAAW_OPTION_WAIT | LAAW_OPTION_USE_SHELLEXECUTE | LAAW_OPTION_SHOW_HOURGLASS | LAAW_OPTION_HIDDEN;
nResult = LaunchApplication(szExeCmd, szCmdLine, "", SW_HIDE, LAAW_PARAMETERS.nTimeOut, nOptions);
if (nResult < 0) then
Sprintf(szMessage, "\tPython was NOT installed properly!!");
nResult = WriteLine(glLogFile, szMessage);
//MessageBox(szMessage, SEVERE);
else
Sprintf(szMessage, "\tPython WAS installed properly.");
nResult = WriteLine(glLogFile, szMessage);
endif;
return nResult;
end;