Re: subprocess.Popen() and a .msi installer

2010-12-18 Thread Nobody
On Fri, Dec 17, 2010 at 17:57, Sebastian Alonso wrote:

 Hey everyone, I'm working on a script which uses subprocess to launch a
 bunch of installers, but I'm getting problems with .msi installers
 although .exe ones work fine. The output I get is this:

 import subprocess
 p = subprocess.Popen('python.msi')

You need to add shell=True to execute anything which isn't a binary
executable (EXE).

-- 
http://mail.python.org/mailman/listinfo/python-list


subprocess.Popen() and a .msi installer

2010-12-17 Thread Sebastian Alonso
Hey everyone, I'm working on a script which uses subprocess to launch a
bunch of installers, but I'm getting problems with .msi installers although
.exe ones work fine. The output I get is this:

 import subprocess
 p = subprocess.Popen('python.msi')
Traceback (most recent call last):
File pyshell#1, line 1, in module
p = subprocess.Popen('python.msi')
File C:\Python25\lib\subprocess.py, line 593, in __init__
errread, errwrite)
File C:\Python25\lib\subprocess.py, line 793, in _execute_child
startupinfo)
WindowsError: [Error 8] %1 no es una aplicación Win32 válida


Has this ever happen to any of you? The idea is to get this running, make it
an exe (with py2exe) and use it whenever I need to install my whole
development environment in the right order.

Thanks in advance to all of you.


Alonso Sebastian.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: subprocess.Popen() and a .msi installer

2010-12-17 Thread Benjamin Kaplan
On Fri, Dec 17, 2010 at 5:57 PM, Sebastian Alonso
alon.sebast...@gmail.com wrote:
 Hey everyone, I'm working on a script which uses subprocess to launch a
 bunch of installers, but I'm getting problems with .msi installers although
 .exe ones work fine. The output I get is this:

 import subprocess
 p = subprocess.Popen('python.msi')
 Traceback (most recent call last):
 File pyshell#1, line 1, in module
 p = subprocess.Popen('python.msi')
 File C:\Python25\lib\subprocess.py, line 593, in __init__
 errread, errwrite)
 File C:\Python25\lib\subprocess.py, line 793, in _execute_child
 startupinfo)
 WindowsError: [Error 8] %1 no es una aplicación Win32 válida


 Has this ever happen to any of you? The idea is to get this running, make it
 an exe (with py2exe) and use it whenever I need to install my whole
 development environment in the right order.

 Thanks in advance to all of you.


 Alonso Sebastian.


msi files are not executables. You need to use msiexec to run them.
-- 
http://mail.python.org/mailman/listinfo/python-list