Python Forum
run setup.exe from python script with special parameters
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run setup.exe from python script with special parameters
#1
So I have an setup.exe that I want to execute from a python script. If i run it outside a python script so directly in the command line it works as expected now i want to run in from a python script. This is the command; i need all the parameteres and the double quotes in order to to evreything as expected.

  C:\pathToExe\setup.exe /S /v"/qb! /norestart"
How do i store this command in a variable and then execute it in a python script. I know I can use 'subprocess' to execute a .exe but for me the parameters given are important.

Something like this is not working:
myPathExe = 'cmd /q /C' + 'C:\pathToExe\setup.exe' + /S /v"/qb! /norestart"
run(myPathExe)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to receive two passed cmdline parameters and access them inside a Python script? pstein 2 278 Feb-17-2024, 12:29 PM
Last Post: deanhystad
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,007 Jun-29-2023, 11:57 AM
Last Post: gologica
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 1,778 Feb-18-2022, 01:29 PM
Last Post: pstein
  mysql.connector.errors.ProgrammingError: Failed processing format-parameters; Python ilknurg 3 5,465 Jan-18-2022, 06:25 PM
Last Post: ilknurg
  VSCode Setup and configuring to run with Python apollo 2 2,993 Jan-13-2021, 04:55 PM
Last Post: jefsummers
  Python Idlex setup robsuttonjr 3 2,990 Jan-09-2021, 09:54 PM
Last Post: Gribouillis
  python setup.py install error blackclover 2 7,797 Jan-07-2021, 04:36 AM
Last Post: blackclover
  Automating to run python script 100 times by changing parameters pmt 1 2,562 Dec-29-2020, 10:31 AM
Last Post: andydoc
  'python setup.py bdist' gets error on 'compiler_flags' 1780yz 0 2,172 Sep-02-2020, 09:17 PM
Last Post: 1780yz
  Python Class and Object Parameters JoeDainton123 5 2,828 Sep-02-2020, 10:43 AM
Last Post: JoeDainton123

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020