非交互式运行时,PsExec 卡在许可证提示符上
我有一个 Hudson 构建脚本,它调用 SysInternals PsExec 实用程序。通常,当给定用户第一次运行 PsExec 时,它会弹出一个对话框,要求用户接受许可证。构建代理作为服务运行,我可以看到构建卡在 PsExec 处。 Process Explorer 显示 PsExec 正在运行,因此我强烈怀疑它正在显示相同的提示,但由于它以非交互方式运行,因此无法接受该提示。有什么办法可以绕过这个愚蠢的限制吗?在 Windows Server 2008 R2 x64 上运行。
I have a Hudson build script which calls the SysInternals PsExec utility. Normally, when PsExec is run for the first time by a given user it pops up a dialog box asking the user to accept the licence. The build agent runs as a service and I can see that the build gets stuck at PsExec. Process Explorer shows that PsExec is running, so I strongly suspect it's displaying that same prompt, but because it's running non-interactively there is no way to accept the prompt. Is there any way to get around this silly limitation? Running on Windows Server 2008 R2 x64.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用
/accepteula
命令行开关接受许可协议。或者设置
为 1
注意:如果上面的 reg 键设置为 0(EULA 被拒绝一次),那么 /accepteula 将不起作用,您必须手动将键设置为 1(或完全删除它) )。
Use the
/accepteula
command-line switch to accept the licence agreement.Or set
to 1
Caution: if the reg key above is set to 0 (EULA was declined once) then the /accepteula will not work, you have to set the key to 1 manually (or delete it altogether).
-accepteula 标志将禁止显示许可证对话框。这里提供了更多选项:https://ss64.com/nt/psexec.html
-accepteula flag will suppress the display of the license dialog. More options are available here: https://ss64.com/nt/psexec.html
它有文档记录,但您必须使用 2003 版本或更高版本。
It's documented, but you have to use the 2003 version or higher.