开发者

Python: Executing an application to install a program

开发者 https://www.devze.com 2023-01-21 16:25 出处:网络
I am using a 开发者_运维技巧python script to execute an application to install a program. Using os.system(\'dir\\\\application.exe\') works.However the installer has 2 installation parts and after com

I am using a 开发者_运维技巧python script to execute an application to install a program. Using os.system('dir\\application.exe') works. However the installer has 2 installation parts and after completing the first one, it will hang there. The second one will only execute when I exit the python script. How can I get the whole installation process to complete without killing it in the script?


from what you provided it is not clear why the installer is hanging. I've ran installers here and it works fine. Which installer are you running? Is it public available?

As a sidenote, don't use os.system to run your application. It needlessy invokes the shell -- use subprocess module instead:

subprocess.call(['dir/application.exe'])
0

精彩评论

暂无评论...
验证码 换一张
取 消