如何在windows中通过“系统”用户执行python subprocess.Popen()

2024-10-05 14:24:21 发布

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

我正在使用python脚本启动JavaSpringBootWeb服务 这是我的密码

import os
import subprocess

subprocess.Popen("java -jar webService.jar", shell=True)

我希望这个过程通过windows中的“系统”用户运行,是否有任何正确的方法可以做到这一点


Tags: 用户import脚本true密码os过程windows