Dll VBS-注册并使用Dsofile Windows 7 64位

Dll VBS-注册并使用Dsofile Windows 7 64位,dll,vbscript,dllregistration,dsofile,Dll,Vbscript,Dllregistration,Dsofile,我正在尝试在Windows7 64位计算机上使用VBS脚本。我相信我的问题是注册DLL 我用这个来注册DLL regsvr32 D:\Desktop\dsofile.dll 我听说 "DllRegisterServer in D:\Desktop\dsofile.dll succeeded." 让我相信一切都是成功的。当我尝试运行Microsoft提供的测试代码时 Set objFile = CreateObject("DSOFile.OleDocumentProperties") objF

我正在尝试在Windows7 64位计算机上使用VBS脚本。我相信我的问题是注册DLL

我用这个来注册DLL

regsvr32 D:\Desktop\dsofile.dll
我听说

"DllRegisterServer in D:\Desktop\dsofile.dll succeeded."
让我相信一切都是成功的。当我尝试运行Microsoft提供的测试代码时

Set objFile = CreateObject("DSOFile.OleDocumentProperties")
objFile.Open("D:\Desktop\test.xls")
Wscript.Echo "Author: " & objFile.SummaryProperties.Author
它在第一行失败,声明

"ActiveX component can't create object: 'DOSFile.OLEDocumentProperties"
这让我相信DLL实际上没有正确注册

然后,我尝试根据解决方案注册DLL,方法如下

cd \Windows\SysWOW64
regsvr32 C:\dsofile.dll
它还通知我它注册正确,但脚本在第一行再次失败

如何修复此问题,以便使用Dsofile


谢谢。

您必须使用c:\windows\syswow64中的32位脚本解释器。您需要断开dsofile,因为它没有未来。使用C:\Windows\SysWOW64\cscript.exe test.vbs执行脚本修复了此问题。谢谢你。@HansPassant:为什么不把它作为一个答案呢?因为有成千上万的程序员依赖于dsofile,他们会对我发泄愤怒。他们确实在这附近射杀信使。@HansPassant,你说得对。我是那一千个程序员中的一个。您的DSO备选方案是什么?是开放式Office SDK吗?