无法从 Python 运行 32 位 VB 脚本
我正在尝试运行一个基于32位dll的VB脚本,因为我已经更改了默认的Windows程序来运行这个脚本(SysWoW64\cscript.exe),所以我只需双击它就可以运行它,现在我想使用下面的代码在 python 27(32 位)中运行相同的脚本:
import os
os.chdir("C:\Users\OFFICE2\Desktop")
os.system("ResultSaver.vbs")
但它不运行!老实说,昨天它运行得很好,但今天却不行了!我已经重新启动了电脑几次,但没有发生任何变化!
有人可以帮助我吗,这让我发疯,
我安装了 Windows 7 64 位,
I am trying to run a VB script which is based on a 32-bit dll, as I have changed the default windows program to run this script (SysWoW64\cscript.exe), so I can run it simply by double clicking on it, now I want to run the same script within python 27 (32-bit) with the code below:
import os
os.chdir("C:\Users\OFFICE2\Desktop")
os.system("ResultSaver.vbs")
but it doesn't run! to be honest yesterday it was running perfectly but today it doesn't! I have restarted my PC several times but no changes happened!
can someone please help me, this is driving me crazy
I have windows 7 64-bit installed,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过几天的努力解决这个问题终于我找到了解决方案,
我制作了一个批处理文件:
然后我使用以下网站将批处理文件转换为exe文件:
http://www.f2ko.de/programs.php?lang=en&pid=ob2e
然后使用以下命令运行 exe 文件下面的代码:
我是当然有一个更简单的解决方案,但目前这个解决方案有效!
After a few days struggling with this problem finally I found a solution,
I made a batch file as:
then I converted my batch file to exe file with this website:
http://www.f2ko.de/programs.php?lang=en&pid=ob2e
and then ran the exe file with the below code:
I am sure that there is an easier solution but for now this one works!