如何在64位计算机上运行一个VBScript在32位模式? [英] How do I run a VBScript in 32-bit mode on a 64-bit machine?
问题描述
我有一个与我在写了下面的.vbs结尾的文本文件:
设置康恩=的CreateObject(ADODB.Connection)
Conn.Provider =Microsoft.ACE.OLEDB.12.0
Conn.Properties(数据源)=C:\ dummy.accdb
Conn.Properties(喷气机OLEDB:数据库密码)=通行证
Conn.Open
Conn.Close
设置康恩=什么
- 当我执行这个在Windows 32位计算机上运行,结束没有任何概念(预期)。
- 当我执行这个在Windows 64位计算机上它得到的错误
提供商无法找到。它可能没有被正确安装。
但是它安装。我认为,问题的根源在于,提供者是一个32位的供应商,因为据我所知,不存在为64位。
如果我在我的64位计算机运行VBScript通过IIS(作为一个ASP文件),我可以选择,它应该在32位模式下运行。然后,它可以找到供应商。
我怎样才能使找到的64位Windows上的供应商?我能告诉的CScript(它执行该.vbs文本文件),在32位模式下运行不知何故?
按照 http://support.microsoft.com/kb/ 896456
要启动32位命令提示符,请按照下列步骤操作:
*单击开始,单击运行,键入%windir%\ SYSWOW64 \ cmd.exe,然后单击确定。
然后键入
CSCRIPT vbscriptfile.vbs
I have a text file that ends with .vbs that I have written the following in:
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.ACE.OLEDB.12.0"
Conn.Properties("Data Source") = "C:\dummy.accdb"
Conn.Properties("Jet OLEDB:Database Password") = "pass"
Conn.Open
Conn.Close
Set Conn = Nothing
- When I execute this on a Windows 32-bit machine it runs and ends without any notion (expected).
- When I execute this on a Windows 64-bit machine it gets the error
Provider cannot be found. It may not be properly installed.
But it is installed. I think the root of the problem is that the provider is a 32-bit provider, as far as I know it doesn't exist as 64-bit.
If I run the VBScript through IIS on my 64-bit machine (as a ASP file) I can select that it should run in 32-bit mode. It can then find the provider.
How can I make it find the provider on Windows 64-bit? Can I tell CScript (which executes the .vbs text file) to run in 32-bit mode somehow?
follow http://support.microsoft.com/kb/896456
To start a 32-bit command prompt, follow these steps:
* Click Start, click Run, type %windir%\SysWoW64\cmd.exe, and then click OK.
Then type
cscript vbscriptfile.vbs
这篇关于如何在64位计算机上运行一个VBScript在32位模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!