我在python子进程中运行psexec
import subprocess
prog = subprocess.Popen([
'C:\\Users\\user\\tools\\PSTools\\PsExec.exe',
'-u',
'admin',
"-p",
"pass",
"cmd.exe"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True
)
在这样做的过程中,psexec打开了一个新的提升终端窗口,我想问的是,是否有必要通过子流程来控制这个窗口,因为它是最初启动它的?因为目前stdin和stdout似乎只是启动psexec的子进程,而不是psexec生成的终端
抱歉,如果这是个愚蠢的问题,我只是想寻求帮助
PsExec使用管理共享将文件复制到目标计算机,然后将其作为服务启动,然后该服务启动指定的程序。所以你的程序没有连接
使用COM
来自帮助http://download.microsoft.com/download/winscript56/Install/5.6/W982KMeXP/EN-US/scrdoc56en.exe
相关问题 更多 >
编程相关推荐