Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7089819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:58:07+00:00 2026-05-28T07:58:07+00:00

Creating an installer for possible remote systems so that if they do not have

  • 0

Creating an installer for possible remote systems so that if they do not have something installed, it will start the autorun.exe on their desktop (sure it would be easy to give them the link and they could click start and run… but this would be 100% better if it was done for them!)

Heres the model I have been using and I should mention that I am testing between both a windows 7 and XP machine, although I don’t think its too big of a deal.

import wmi
import win32com.client

def Copy_Program(computer=None, environment="Production"):
    Oracle_install = r'\\server1\Install\Oracle\Oracle9i_Disk1\autorun\autorun.exe'


    """  BELOW PROCESS SHOWS UP IN TASKMANAGER, but I NEED IT TO BE INTERACTIVE.
    wmi = win32com.client.GetObject ("winmgmts:\\\\"+computer+"\\root\\cimv2")
    win32_process = wmi.Get ("Win32_Process")
    in_parameters = win32_process.Methods_ ("Create").InParameters
    in_parameters.Properties_ ('CommandLine').Value = "notepad.exe"
    result = win32_process.ExecMethod_ ("Create", in_parameters)
    """  
    SW_SHOWMINIMIZED = 1

    c = wmi.WMI (computer)
    startup = c.Win32_ProcessStartup.new (ShowWindow=SW_SHOWMINIMIZED)
    pid, result = c.Win32_Process.Create (
    CommandLine=Oracle_install,
    ProcessStartupInformation=startup
    )
if __name__ == '__main__':
    Copy_Program(computer = "D02659")

Now as Mr Tim Golden had mentioned in the docs… remoting to another machine is pretty simple… you just

c = wmi.WMI("REMOTE_COMPUTER")

and away you go…

and technically it does work, but its not interactive for some reason… I’ve also tinkered with the SW_SHOWMINIMIZED values, but I can’t seem to understand what I’m doing wrong. I have domain admin, so it shouldn’t be an issue… especially since I am logged into both systems at the same time… weird.

Anyhow, help is very much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:58:08+00:00Added an answer on May 28, 2026 at 7:58 am

    PSEXEC looks like its the only viable solution here unfortunately… as much as I hate to invoke a 3rd party tool, this works well.

    import subprocess
    import getpass
    
    Oracle = r'\\server\z$\deploy\Install\Oracle\Oracle9i_Disk1\Oracle9i_Disk1\autorun\autorun.exe'
    
    def Craft_Startup(COMPUTER, COMMAND):
        UNAME="DOMAIN\\"+getpass.getuser()
        PASSWD = getpass.getpass()
        subprocess.Popen("psexec -u "+ UNAME +" -p " + PASSWD + " \\\\"+COMPUTER+" -i " + COMMAND)
    
    
    if __name__ == '__main__':
        COMPUTER = 'P04213'
        COMMAND = Oracle
        Craft_Startup(COMPUTER, 'cmd.exe /c start ' + COMMAND)
    

    So the necessity here is to put psexec in the system32 folder or… specify the path if you’d like

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write an installer (by creating a .vdproj) that will work
I'm creating an installer for a website that uses a custom event log source.
I am creating an installer that also needs to delete the Arial font (I
I have been tasked with creating a program what will create take files in
I have a ini file with db connection settings. I am creating an installer
Is it possible to write a program that masks the set of fonts installed
I'm creating installer using InstallShield 2010 (basic MSI) that is having two features. First
I'm creating a Maven archetype which generates a project skeleton that will include a
I am creating an installer for an ASP.Net website using WiX. How do you
I am creating a installer in .NET and using custom actions for controlling installation.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.