【发布时间】:2017-12-29 01:12:31
【问题描述】:
最近几天我搜索了很多,但找不到我缺少的东西。 我们大量使用脚本(vbs、Python、Groovy)进行测试。 前几天我得到了一个装有 Windows 10 的新笔记本,现在脚本没有输出。它们运行,但它就像 Windows 吞咽标准输出,也重定向到文件不起作用。 我团队中的其他人还没有 Windows 10,所以我不确定这是否特定于 Windows 10 或我的计算机。我们的 IT 也帮不上忙。
当我在脚本名称左侧给出 cscript.exe、python.exe 或 groovy.exe 时,一切都很好,但当我通过文件关联调用脚本时就不行了。他们跑着,但安静地跑着!
我重新安装了 Python 和 Groovy,所以 ftype 和 assoc 都可以,如 How to run VBScript from command line without Cscript/Wscript 或 Perl not running in Windows 10 中给出的那样。
我还检查了 HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\ 中的 InheritConsoleHandles,正如 Cannot redirect output when I run Python script on Windows using just script's name 中所暗示的那样。
我们需要将 exe 调用放在前面的地方太多了,需要一个更好的解决方案。请帮忙。
【问题讨论】:
-
由于与编程无关,这个问题我应该迁移到Super User
标签: python groovy vbscript windows-10