pushing python to multiple windows machines

R

Roger Upole

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...=1&q="Pushing+Python+to+Windows+workstations"

-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('wbemscripting.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top