Popen 在本地工作但不是远程问题
Popen works locally but not remotely issue
我通过 pyinstaller 创建了一个 python.exe,它将打开一个名为 notpadplus.Lnk 的记事本 ++ 快捷方式。
当我在本地运行程序时,python.exe会打开notepad++。
但是,当我告诉 Jenkins 运行 时 python.exe 什么也没有打开。
subprocess.Popen(os.path(self.JenkinsFolderPath , 'Notepadplus.lnk'))
这是我在python中调用打开快捷方式的方法,在jenkins中我使用powershell脚本调用python.exe:
Start-Process "c:\JenkinsResources\MarinaMain.exe" -ArgumentList "$UserName" -Wait
我想知道的问题是为什么 Popen 无法远程工作以及我必须选择的解决此问题的方法。
谢谢!
我解决这个问题的方法是:
服务 -> Jenkins 代理 -> 登录
然后我会设置"This account"为当前用户。之后 Popen 将工作并打开我需要在该当前用户上使用的任何内容。
我通过 pyinstaller 创建了一个 python.exe,它将打开一个名为 notpadplus.Lnk 的记事本 ++ 快捷方式。
当我在本地运行程序时,python.exe会打开notepad++。 但是,当我告诉 Jenkins 运行 时 python.exe 什么也没有打开。
subprocess.Popen(os.path(self.JenkinsFolderPath , 'Notepadplus.lnk'))
这是我在python中调用打开快捷方式的方法,在jenkins中我使用powershell脚本调用python.exe:
Start-Process "c:\JenkinsResources\MarinaMain.exe" -ArgumentList "$UserName" -Wait
我想知道的问题是为什么 Popen 无法远程工作以及我必须选择的解决此问题的方法。
谢谢!
我解决这个问题的方法是:
服务 -> Jenkins 代理 -> 登录
然后我会设置"This account"为当前用户。之后 Popen 将工作并打开我需要在该当前用户上使用的任何内容。