使用python命令提示符启动应用程序

2024-10-04 05:28:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我想用python打开一个命令提示符,然后我需要在这个命令提示符上运行一个命令来启动一个应用程序。在

在Windows服务器上尝试并输入以下命令时,输入命令2008R2并输入错误代码:

'C:\Windows\System32\CompMgmtLauncher.exe' is not recognized as an internal or external command, operable program or batch file.

我的代码:

Popen(["start", "/MAX","cmd.exe"], shell=True)
wait(3)
print("Starting Application")
type("c:\\Windows\\System32\\CompMgmtLauncher.exe")
type(Key.ENTER)

请帮忙解决这个问题。在


Tags: or命令服务器应用程序iswindowsastype