Need help with python msi install on windows

802 views
Skip to first unread message

Matt F

unread,
May 3, 2013, 1:53:12 PM5/3/13
to puppet...@googlegroups.com
I'm trying to install python (via msi) onto a windows 2008R2 box. I'm using puppet 3.1 on the client, 3.0.2 on the puppet server. Here is my install.pp:

class python::install {
    package { 'python':
        ensure          => installed,
        provider        => 'msi',
        source          => '\\\\example.com\\software\\python\\python-2.7.3.amd64.msi',
        install_options => [ { 'INSTALLDIR' => 'C:\python27' }, { 'ALLUSERS' => '1' } ],
    }
}

I can see the "msiexec" process running on the client, but it seems to run forever without installing anything.

Any help would be greatly appreciated!

Matt F

unread,
May 7, 2013, 1:26:10 PM5/7/13
to puppet...@googlegroups.com
Bump. Any help on this would be GREATLY appreciated! I also notice in the windows event log that I get the error "Failed to install:  Fail on INT 24." and "/Stage[main]/Python::Install/Package[python]/ensure: change from absent to present failed: Failed to install:  Fail on INT 24."

I've tried running "puppet apply --debug --trace" from a "command prompt with puppet", but this just hangs.

Josh Cooper

unread,
May 21, 2013, 12:49:37 AM5/21/13
to puppet...@googlegroups.com
Hi Matt,


On Tue, May 7, 2013 at 10:26 AM, Matt F <mfan...@gmail.com> wrote:
Bump. Any help on this would be GREATLY appreciated! I also notice in the windows event log that I get the error "Failed to install:  Fail on INT 24." and "/Stage[main]/Python::Install/Package[python]/ensure: change from absent to present failed: Failed to install:  Fail on INT 24."

You may be running into http://projects.puppetlabs.com/issues/20534. May sure to use backslashes, but don't escape them, e.g. '\\server\share\python.msi'


I've tried running "puppet apply --debug --trace" from a "command prompt with puppet", but this just hangs.

Are you running as an administrator? Do you have any custom facts (if so, check that they aren't executing a command that is hanging waiting for input, e.g. date.exe). I recommend installing process explorer and see what puppet's ruby.exe process is executing.

Also verify that the MSI can be installed silently from the command line directly (msiexec.exe /qn /norestart /i python.msi. It is up to the MSI author to ensure that it abides by the specified UI level.
 



On Friday, May 3, 2013 1:53:12 PM UTC-4, Matt F wrote:
I'm trying to install python (via msi) onto a windows 2008R2 box. I'm using puppet 3.1 on the client, 3.0.2 on the puppet server. Here is my install.pp:

class python::install {
    package { 'python':
        ensure          => installed,
        provider        => 'msi',
        source          => '\\\\example.com\\software\\python\\python-2.7.3.amd64.msi',
        install_options => [ { 'INSTALLDIR' => 'C:\python27' }, { 'ALLUSERS' => '1' } ],
    }
}

I can see the "msiexec" process running on the client, but it seems to run forever without installing anything.

Any help would be greatly appreciated!

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Josh Cooper
Developer, Puppet Labs

Join us at PuppetConf 2013, August 22-23 in San Francisco - http://bit.ly/pupconf13
Register now and take advantage of the Early Bird discount - save 25%!

Klavs Klavsen

unread,
May 22, 2013, 5:16:22 AM5/22/13
to puppet...@googlegroups.com
Try:

class python::install {
    package { 'python':
        ensure          => installed,
        source          => "\\\\example.com\\software\\python\\python-2.7.3.amd64.msi",
        install_options => [ { 'INSTALLDIR' => 'C:\python27' }, { 'ALLUSERS' => '1' } ],
    }
}


p.s. with puppet 3 - provider should be windows - and should be so pr. default.

notice that it HAS to be a valid UNC path - otherwise you could try to put a file resource - to throw the msi to c:\temp f.ex. - and use that as UNC path to package.

Kevin D

unread,
May 22, 2013, 5:10:48 PM5/22/13
to puppet...@googlegroups.com
Matt,

I tried your class in my test environment.  Here are my findings:

Using Microsoft's Process Monitor, we capture Puppet's call to MSIEXE, the "command line" value reads:

msiexec.exe /qn /no restart /i \\\\example.com\\temp\\python-2.7.3.amd64.msi INSTALLDIR=C:\python27 ALLUSERS=1

It makes sense that you are getting an error because msiexec cannot find "\\\\example.com\\temp\\python-2.7.3.amd64.msi".

In order to successfully install, change the "source" line single quotes (') to double quotes(").  On next Puupet run, Process Monitor "command line" value reads:

msiexec.exe /qn /no restart /i \\example.com\temp\python-2.7.3.amd64.msi INSTALLDIR=C:\python27 ALLUSERS=1

Another note:
Using Microsoft's orca.exe, the "python-2.7.3.amd64.msi" doesn't contain properties for INSTALLDIR or ALLUSERS.  These aren't msiexec default properties either.  As a result, these parameters are being ignored by msiexec.  You wouldn't notice this because the values you happen provided for these errant keys are the defaults.  If you comment the " install_options" line, it will still install in C:\Python27 for all users.

If you wanted to specify a custom install directory, you would need to use TARGETDIR. 
If you wanted to restrict user access, you would need to use WHICHUSERS.  WHICHUSERS accepts "ALL" or "JUSTME"

To install for the current user in specified directory "C:\python273"

install_options => [ { 'TARGETDIR' => 'C:\python273' }, { 'WHICHUSERS' => 'JUSTME' } ],


Here is your stanza fixed (with the install_options line optional [since you are using the defaults]):


class python::install {
    package { 'python':
        ensure          => installed,
        provider        => 'msi',
        source          => "\\\\example.com\\software\\python\\python-2.7.3.amd64.msi",
        #install_options => [ { 'TARGETDIR' => 'C:\python27' }, { 'WHICHUSER => 'ALL' } ],
    }
}

I hope this helps.

-Kev

Kevin D

unread,
May 22, 2013, 5:13:18 PM5/22/13
to puppet...@googlegroups.com
Oops... you should also change the provider as Klavs recommends:

class python::install {
    package { 'python':
        ensure          => installed,
        provider        => 'windows',
        source          => "\\\\example.com\\software\\

Gene Fontanilla

unread,
Jul 6, 2015, 9:57:26 AM7/6/15
to puppet...@googlegroups.com, kevin.d...@pearson.com

Hi I've been trying to execute what you have checked done here but i still get the error of "does not know how to install, here is my code:

 package { "python-2.7.3.amd64":
                ensure => 'installed',
                source => "${$installexec}/python-2.7.3.amd64",
                install_options => [{'TARGETDIR' => 'c:/python27'} , {'WHICHUSERS' => 'ALL'} ]
                }

can you help me?
 

Rob Reynolds

unread,
Jul 6, 2015, 4:00:27 PM7/6/15
to puppet...@googlegroups.com, kevin.d...@pearson.com
Looks like you almost have it. You need the full path to the installer file. Should end with the extension ".msi".

Your package title (e.g. "python-2.7.3.amd64") also needs to exactly match what programs and features will list, which is likely 'Python'.
 
                install_options => [{'TARGETDIR' => 'c:/python27'} , {'WHICHUSERS' => 'ALL'} ]
                }

can you help me?
 

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.



--
Rob Reynolds
Developer, Puppet Labs

PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Adopter discount save $349!

Gene Fontanilla

unread,
Jul 6, 2015, 10:48:25 PM7/6/15
to puppet...@googlegroups.com, kevin.d...@pearson.com
Looks like you almost have it. You need the full path to the installer file. Should end with the extension ".msi".

Your package title (e.g. "python-2.7.3.amd64") also needs to exactly match what programs and features will list, which is likely 'Python'.
 


Hi bob,

i added .msi file extension and
        package { "python-2.7.5.amd64.msi":
                ensure => 'installed',
                source => 'c:/PreRecap/python-2.7.5.amd64.msi',

                install_options => [{'TARGETDIR' => 'c:/python27'} , {'WHICHUSERS' => 'ALL'} ]
                }
now i get the error: Failed to install, FATAL error during installation.


 I don't know what i'm doing wrong.
 

Rob Reynolds

unread,
Jul 7, 2015, 12:41:00 AM7/7/15
to puppet...@googlegroups.com
To verify, the file you have located at c:/PreRecap/python-2.7.5.amd64.msi is actually a downloaded MSI file correct?
 


 I don't know what i'm doing wrong.
 

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Gene Fontanilla

unread,
Jul 7, 2015, 1:40:28 AM7/7/15
to puppet...@googlegroups.com
To verify, the file you have located at c:/PreRecap/python-2.7.5.
amd64.msi is actually a downloaded MSI file correct?

yes bob you are correct

Rob Reynolds

unread,
Jul 8, 2015, 2:30:52 PM7/8/15
to puppet...@googlegroups.com
So double click the file, it should come up with an install box. Exit it without finishing the install. Then try running it from the command line:

msiexec /norestart /i c:\PreRecap\python.amd64.msi TARGETDIR=c:/python27 WHICHUSERS=ALL
 
Note that msiexec may not like your forward slashes, which may indicate the issue.

If that can go all the way through, then uninstall and try adding '/qn' (e.g. 'msiexec /qn /norestart /i ...') and running it again.

Once you have all of the switches set properly, then you can plug it into the built-in package resource.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Gene Fontanilla

unread,
Jul 10, 2015, 3:12:39 AM7/10/15
to puppet...@googlegroups.com
The install box pops up and still requires me to choose the options

I tried your script too. still same results. 

Rob Reynolds

unread,
Jul 14, 2015, 11:04:38 AM7/14/15
to puppet...@googlegroups.com
On Fri, Jul 10, 2015 at 2:12 AM, Gene Fontanilla <ginofon...@gmail.com> wrote:
The install box pops up and still requires me to choose the options

I tried your script too. still same results. 

On Thursday, July 9, 2015 at 2:30:52 AM UTC+8, Rob Reynolds wrote:


On Tue, Jul 7, 2015 at 12:40 AM, Gene Fontanilla <ginofon...@gmail.com> wrote:
To verify, the file you have located at c:/PreRecap/python-2.7.5.
amd64.msi is actually a downloaded MSI file correct?

yes bob you are correct

So double click the file, it should come up with an install box. Exit it without finishing the install. Then try running it from the command line:

msiexec /norestart /i c:\PreRecap\python.amd64.msi TARGETDIR=c:/python27 WHICHUSERS=ALL
 
Note that msiexec may not like your forward slashes, which may indicate the issue.

If that can go all the way through, then uninstall and try adding '/qn' (e.g. 'msiexec /qn /norestart /i ...') and running it again.

I'm guessing you didn't make it this far.

 

Once you have all of the switches set properly, then you can plug it into the built-in package resource.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d0203c7f-1d6e-463e-aab3-3b89b9ed9c6f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Adopter discount save $349!

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Rob Reynolds
Developer, Puppet Labs

PuppetConf 2015 is coming to Portland, Oregon! Join us October 5-9.
Register now to take advantage of the Early Bird discount save $249!
Reply all
Reply to author
Forward
0 new messages