使用子进程执行CMD命令

时间:2016-04-30 18:41:24

标签: python-2.7 python-3.x

import subprocess
subprocess.call("reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v ProxyServer /t REG_SZ /d 177.40.215.116:8080 /f")
subprocess.call("reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings /v ProxyEnable /t REG_DWORD /d 1 /f")

我尝试使用子流程库运行此命令,但它没有工作,也没有给我任何错误

0 个答案:

没有答案
相关问题