cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lukas_h
Level 2

Execute command post-install action fails during installation. However, the same command line works fine in a local cmd window on the same host.

Hello,

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

 

Execute Command:         

msiexec /i "C:\Program Files\asd\post-install\python-2.7.9.amd64.msi" /qn TargetDir="%EMBEDDED_DIR%\Python27"

Status: SUCCESSFUL

When the installer runs the command I get this window, and python is not installed:

Screenshot 2020-03-18 at 14.47.02.png

 

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?

0 Kudos
(1) Reply
lukas_h
Level 2

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. 

0 Kudos