这是我正在尝试做的...
从网络下载一个 exe 静默安装 运行下载的 exe 并传递一个参数
我的代码是
import urllib.request
import shutil
import subprocess
import os
from os import system
url = "https://downloads.com/App.exe"
output_file = "C:\\files\App.exe"
with urllib.request.urlopen(url) as response, open(output_file, 'wb') as out_file:
shutil.copyfileobj(response, out_file)
# Silent Install
subprocess.call("C:\\files\App.exe /SILENT ")
system("C:\\Program Files (x86)\\files\App.exe -ARG")
当我运行它时,它会下载 exe,然后安装 exe,但在尝试 exe 下载的文件时失败并出现此错误
'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
MMTTMM
慕的地8271018
相关分类