- Jun
- 137
- 3
I've got a home-grown COM component, PEIVersion.dll, that works fine from VB6 (yes, VB6) programs. It also works fine in a VBScript, Version.vbc, when I execute it from a 32-bit installation of TCC 15.01.52 on Windows 7.
Here is the execution under TCC 15, 32-bit:
When I run the same script on the same Windows 7 64-bit machine, but under TCC v16 x64, the script reports that it can't create the PEIVersionDLL.PEIVersion object.
Is there something about the COM registration that is different for the 64-bit TCC versus the 32-bit TCC, or is it something else? Anyone have any ideas on how I might fix or even troubleshoot this?
Code:
->type c:\Utils\version.vbc
Dim sFile, sVersion, ArgObj, StdOut, i, fso, version
Set ArgObj = WScript.Arguments
Set StdOut = WScript.StdOut
Set fso = CreateObject("Scripting.FileSystemObject")
Set version = CreateObject("PEIVersionDLL.PEIVersion")
For i = 0 To ArgObj.Count - 1
sFile = ArgObj.Item(i)
sVersion = GetVersion(sFile)
WScript.Echo sFile & " is version " & sVersion
Next
Set fso = Nothing
Set version = Nothing
WScript.Quit (0)
Function GetVersion(PathSpec)
Dim temp
If fso.FileExists(PathSpec) Then
temp = version.GetPEIVersion(PathSpec)
If Len(temp) Then
GetVersion = temp
Else
GetVersion = "*** No version information available. ***"
End If
Else
GetVersion = "*** File not found. ***"
End If
End Function
Here is the execution under TCC 15, 32-bit:
Code:
->ver
TCC 15.01.52 Windows 7 [Version 6.1.7601]
->assoc .vbc
.VBC=VBCFile
->ftype vbcfile
vbcfile="C:\Windows\System32\CScript.exe" "%1" %*
->which version
version is an executable extension : C:\Windows\system32\cscript.exe /nologo c:\Utils\Version.vbc
->version c:\Emacs\bin\emacs.exe
c:\Emacs\bin\emacs.exe is version 24.3.0.0
When I run the same script on the same Windows 7 64-bit machine, but under TCC v16 x64, the script reports that it can't create the PEIVersionDLL.PEIVersion object.
Code:
->ver
TCC 16.00.36 x64 Windows 7 [Version 6.1.7601]
->assoc .vbc
.VBC=VBCFile
->ftype vbcfile
vbcfile="C:\Windows\System32\CScript.exe" "%1" %*
->which version
version is an executable extension : C:\Windows\system32\cscript.exe /nologo c:\Utils\Version.vbc
->version c:\Emacs\bin\emacs.exe
C:\Utils\Version.vbc(6, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'PEIVersionDLL.PEIVersion'
Is there something about the COM registration that is different for the 64-bit TCC versus the 32-bit TCC, or is it something else? Anyone have any ideas on how I might fix or even troubleshoot this?