I have a VBScript CA that runs near the end of our install and, for the most part, I have no problems. However, on a certain user's system, I get a 1720 error indicating that ActiveX object can't be created as seen in the verbose log.
Here is the snippet of code used in a .vbs. I've tested this on the user's system to ensure I duplicate the 'broken' state with its execution....
***************************************************
Set cn = CreateObject("ADODB.Connection")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set a = CreateObject("ADOX.Catalog")
TargetFile = "c:\Test\Test.mdb"
If objFSO.FileExists(TargetFile) Then
sTempStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source =" & TargetFile
cn.connectionstring = sTempStr
cn.Open
a.ActiveConnection = sTempStr
For i = 0 To a.tables.Count - 1
If UCase(a.tables(i).Name) = "MYTABLE" Then
WH = "1"
MsgBox WH
End If
Next
cn.Close
End If
Set a = Nothing
Set cn = Nothing
******************************************************
All this does is run through a database to see if a certain table is present. A message box displaying "1" will appear if the indicated table exists.
In my real script and this test script, it is breaking at:
Set a = CreateObject("ADOX.Catalog")
In the actual insall log, I get:
-2146827859, Microsoft VBScript runtime error: ActiveX component can't create object: 'ADOX.Catalog'.
What ActiveX dependency is the user's system missing? Or, how can I go about finding what is missing?
Any help is greatly appreciated, as always.
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Can't Create Object Error with VBScript
Started by
Superfreak3
, Jul 06 2006 17:40
1 reply to this topic