Execute command post-install action fails during installation. However, the same command line works fine in a local cmd window on the same host.
I’m trying to initiate a silent python install from my install anywhere project, as a post-install action (execute command). This is the command line in my IA project:
msiexec /i “$USER_INSTALL_DIR$$\$post-install$\$python-2.7.9.amd64.msi” /qn TargetDir=“%EMBEDDED_DIR%\Python27”
This is from the install log
msiexec /i "C:\Program Files\asd\post-install\python-2.7.9.amd64.msi" /qn TargetDir="%EMBEDDED_DIR%\Python27"
When the installer runs the command I get this window, and python is not installed:
However, if I copy-paste the above command into a cmd window after completing the installation, it installs successfully.
I also tried to use $USER_INSTALL_DIR$ instead of %EMBEDDED_DIR%, both paths point to the same location.
Any ideas why the same command fails when executed by IA?
Re: Execute command post-install action fails during installation. However, the same command line works fine in a local cmd window on the same host.
Update: I was able to work around the issue by putting the following command in a .bat file:
msiexec /i "%EMBEDDED_DIR%\post-install\python-2.7.9.amd64.msi" /qn TargetDir="%EMBEDDED_DIR%\Python27"
and changing the command line of the execute command action to:
cmd /c "path/to/bat/file"
still interested to know why the original command line didn't work when executed by IA.