使用 python os.system 命令窗口时出现 Certutil“Too Many Arguments”错误

问题描述

尝试使用以下代码将简单文件解码为临时文本文件

os.system("start cmd /k certutil -f -decode \\SDHQFILE03.enxco.com\\arcgis\\General\\Solar\\R_and_D\\CodeLibrary\\Python\\EPE2.1.7\\34287.bat \\SDHQFILE03.enxco.com\\arcgis\\General\\Solar\\R_and_D\\CodeLibrary\\Python\\SETI\test3.txt")

每次运行此程序时,我都会收到来自 certutil 的错误消息,提示我有多参数(预期为 3 个,其中 2 个) - 将代码直接复制到命令窗口中,如图所示,它可以正确运行:

certutil -f -decode \\SDHQFILE03.enxco.com\\arcgis\\General\\Solar\\R_and_D\\CodeLibrary\\Python\\EPE2.1.7\\34287.bat \\SDHQFILE03.enxco.com\\arcgis\\General\\Solar\\R_and_D\\CodeLibrary\\Python\\SETI\test3.txt

我在第一个语句中遗漏了什么以使其能够无误地运行?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)