pushing python to multiple windows machines

Discussion in 'Python' started by shkelley@gmail.com, Oct 21, 2005.

  1. Guest

    , Oct 21, 2005
    #1
    1. Advertising

  2. Roger Upole Guest

    <> 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...=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



    ----== 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 =----
     
    Roger Upole, Oct 21, 2005
    #2
    1. Advertising

  3. Guest

    Thanks Roger & Larry. Both of your suggestions are very helpful!

    -shawn
     
    , Oct 21, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Graeme Matthew
    Replies:
    6
    Views:
    302
    Graeme Matthew
    Jul 6, 2003
  2. delphiro
    Replies:
    1
    Views:
    352
    John J. Lee
    Jul 4, 2003
  3. Tim Golden
    Replies:
    2
    Views:
    331
    Larry Bates
    Oct 21, 2005
  4. Don Taylor
    Replies:
    5
    Views:
    624
    Don Taylor
    Feb 22, 2006
  5. graham.reeds
    Replies:
    9
    Views:
    1,134
    Pavel Lepin
    Feb 4, 2008
Loading...

Share This Page