Python Forum

Full Version: run setup.exe from python script with special parameters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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)