Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   pushing python to multiple windows machines (http://www.velocityreviews.com/forums/t350545-pushing-python-to-multiple-windows-machines.html)

shkelley@gmail.com 10-21-2005 11:44 AM

pushing python to multiple windows machines
 
I am working on a project that requires python to be installed on a
large number of windows servers and was wondering if anyone has found a
method to do this. I found the article from 2003, but nobody ever
stated that they have found an option for this.

http://groups.google.com/group/comp....orkstations%22

-shawn


Roger Upole 10-21-2005 01:49 PM

Re: pushing python to multiple windows machines
 
<shkelley@gmail.com> wrote:
>I am working on a project that requires python to be installed on a
> large number of windows servers and was wondering if anyone has found a
> method to do this. I found the article from 2003, but nobody ever
> stated that they have found an option for this.
>
> http://groups.google.com/group/comp....orkstations%22
>
> -shawn
>


You can use WMI to install an Msi installer on a remote machine.
The Win32_Product class has an Install method:

import win32com.client
wmi=win32com.client.gencache.EnsureDispatch('wbems cripting.swbemlocator',0)
s=wmi.ConnectServer('servername')

p=s.Get('win32_product')
inparams=p.Methods_('Install').InParameters
inparams.Properties_('PackageLocation').Value=r'\\ someserver\someshare\python-2.4.2.msi'
inparams.Properties_('AllUsers').Value=True

outparams=p.ExecMethod_('Install',inparams)
print outparams.Properties_('ReturnValue') ## zero on success



Roger



----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

shkelley@gmail.com 10-21-2005 04:52 PM

Re: pushing python to multiple windows machines
 
Thanks Roger & Larry. Both of your suggestions are very helpful!

-shawn



All times are GMT. The time now is 11:00 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.