0

On my Windows Server 2008 R2 I installed a COM object and can create it from a classic ASP page.

When I call it from a vbscript file, I get the "can't create" message.

I have tried starting Powershell as administrator and using that to run the script. No luck.

I have tried giving the "everyone" user full control over the COM DLL. No luck.

Any ideas?

user692942
  • 16,398
  • 7
  • 76
  • 175
Scott Pendleton
  • 1,021
  • 3
  • 16
  • 32

1 Answers1

2

The only thing that makes sense to me is that the COM object is the same bit-ness as the class ASP and a different bit-ness than the script engine. I do not know, but I would guess that the classic ASP is 32-bit and your COM object is 32-bit.

To check if it is bit-ness (mismatch between 32 and 64 bit), go to the command line and type

cscript myscript.vbs

where myscript.vbs is the name/path of your vbscript file. Then, from the command line, type

C:\Windows\SysWOW64\cscript myscript.vbs

The version of cscript (or wscript) that runs from a standard command prompt is 64-bit. The one that runs from the \Windows\SysWOW64 directory is the 32-bit version.

You can also look at your object's registration. You can look at the ProgID in the registry under HKEY_CLASSES_ROOT and find the CLSID.

The 64-bit hive for the object will be under HKEY_CLASSES_ROOT\CLSID\Your-prog-id.

The 32-bit hive for the object will be under HKEY_CLASSES_ROOT\Wow6432Node\CLSID\Your-prog-id.

user692942
  • 16,398
  • 7
  • 76
  • 175
Joseph Willcoxson
  • 5,853
  • 1
  • 15
  • 29