how to run VBScript under Windows 64 bits


Hi Friends,
When a try run a DLL using VBScript  with Windows 64 bits a receive error message below, the some DLL called using other 32 bits program like Visual Fox Pro the DLL works fine.

The  registry was made using regsvr32 under SysWOW64 folder.

Error:      ActiveX component can't create object: 'Mydll_Fox_SAP.SAP_Utilits'
Code:      800A01AD
Source:       Microsoft VBScript runtime error

Any idea about this situation?

Tnahks in advance!
dclsoftAsked:
Who is Participating?
 
dclsoftConnect With a Mentor Author Commented:
Mavalph
The solution is setup SSIS (dts in sqlserver 2005)  to run in 32 bits mode the packges

Thanks for your colaboration!
0
 
mavalphaCommented:
By default, you are trying to run your VBS file using the 64-bit CScript.exe, located at C:\Windows\Sytem32.  It sounds like you're pointing to a 32-bit DLL file, so you need to go to C:\Windows\SysWOW64\cscript.exe instead.  (Yes, the numbers are counter-intuitive.)

So, to run it from the command prompt, it would be

C:\Windows\SysWOW64\cscript.exe C:\Users\YourUserName\Desktop\Test.vbs

Open in new window

0
 
dclsoftAuthor Commented:
Mavalpha,

But if I run the VBScript from Sqlserver 2005 DTS (SISS)  it will work?  Can I setup IT into Sqlserver?
0
 
mavalphaCommented:
I believe DTS would let you run an application with parameters (which is what calling cscript.exe as I described above does).
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_21490202.html
0
All Courses

From novice to tech pro — start learning today.