sramesh
Posts: 20
Joined: Sat Mar 08, 2008 8:23 pm

MsiProvideComponentFromDescriptor is returning: 0

Hi,

I have a vbscript that creates a SQL script. When I execute this script, I get the following error. The script returns 0 and continues with the install. Many of the posts that I see in the web are pertaining to the Install Shield or Impersonation.
I tried running this install with administrative rights. But it did not matter.

Can someone help !

Thanks in advance

--------------------------------------------------------------------

Action 12:41:05: RunSQLScripts.
Action start 12:41:05: RunSQLScripts.
MSI (s) (38:A0) [12:41:05:990]: Entering MsiProvideComponentFromDescriptor. Descriptor: H[XLiT}$i@8(605vMk!OLibrary>M5KDYSUnf(HA*L[xeX)y, PathBuf: C5F348, pcchPathBuf: C5F344, pcchArgsOffset: C5F2A4
MSI (s) (38:A0) [12:41:05:990]: MsiProvideComponentFromDescriptor called for component {997FA962-E067-11D1-9396-00A0C90F27F9}: returning harcoded oleaut32.dll value
MSI (s) (38:A0) [12:41:06:006]: MsiProvideComponentFromDescriptor is returning: 0
MSI (s) (38:AC) [12:41:06:021]: Entering MsiProvideComponentFromDescriptor. Descriptor: H[XLiT}$i@8(605vMk!OLibrary>M5KDYSUnf(HA*L[xeX)y, PathBuf: A1ED44, pcchPathBuf: A1ED40, pcchArgsOffset: A1ECA0
MSI (s) (38:AC) [12:41:06:052]: MsiProvideComponentFromDescriptor called for component {997FA962-E067-11D1-9396-00A0C90F27F9}: returning harcoded oleaut32.dll value
MSI (s) (38:AC) [12:41:06:052]: MsiProvideComponentFromDescriptor is returning: 0
MSI (s) (38:AC) [12:41:06:177]: Entering MsiProvideComponentFromDescriptor. Descriptor: H[XLiT}$i@8(605vMk!OLibrary>M5KDYSUnf(HA*L[xeX)y, PathBuf: A1ED44, pcchPathBuf: A1ED40, pcchArgsOffset: A1ECA0
MSI (s) (38:AC) [12:41:06:193]: MsiProvideComponentFromDescriptor called for component {997FA962-E067-11D1-9396-00A0C90F27F9}: returning harcoded oleaut32.dll value
MSI (s) (38:AC) [12:41:06:193]: MsiProvideComponentFromDescriptor is returning: 0
MSI (s) (38:AC) [12:41:06:209]: Note: 1: 2262 2: ListBox 3: -2147287038
Action ended 12:41:06: RunSQLScripts. Return value 0.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: MsiProvideComponentFromDescriptor is returning: 0

Hi,

I'm not sure why you are encountering this behavior. Please post the script you are using on the forum or send us a test case which reproduces this behavior to support at advancedinstaller dot com so we can investigate it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sramesh
Posts: 20
Joined: Sat Mar 08, 2008 8:23 pm

Re: MsiProvideComponentFromDescriptor is returning: 0

Following is my script. It is creating the sql file for me. But not writing the text that i need it to write to the file.
Thanks

---------------------------------------

Const msiViewModifyInsertTemporary = 7
Const IDOK = 1

Dim objFSO, objFolder, objShell, objFile
Dim strDirectory, strFile
Dim SQLCmd
Dim srv
Dim objDB
Dim ServName

Dim db

Set db = Session.Database

strDirectory = Session.Property("APPDIR")
strFile = "\MainSQLScript.sql"

' Create the File System Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject ("wscript.shell")


' Check that the strDirectory folder exists
If objFSO.FolderExists(strDirectory) Then
Set objFolder = objFSO.GetFolder(strDirectory)
Else
Set objFolder = objFSO.CreateFolder(strDirectory)
' WScript.Echo "Just created " & strDirectory
' Set wshshell = nothing
End If

If objFSO.FileExists(strDirectory & strFile) Then
Set objFolder = objFSO.GetFile(strDirectory & strFile)
Else
Set objFile = objFSO.CreateTextFile(strDirectory & strFile,True)

' WScript.Echo "Just created " & strDirectory & strFile
' Set wshshell = nothing

End If

Set objFolder = nothing
set objFile = nothing

Set srv = CreateObject("SQLDMO.SQLServer")
srv.LoginTimeout = 15

ServName = Cstr(Session.Property("SERVER_PROP")) & "\" & Cstr(Session.Property("INSTANCE_PROP"))

UserID = "sa" 'Cstr(Session.Property("USERID_PROP"))

srv.Connect ServName , UserID , "wstest" 'Session.Property("SAPASSWORD_PROP")

Set objDB = CreateObject("SQLDMO.Database")

Set viewlist = Database.OpenView("SELECT * FROM `ListBox` WHERE `Property` ='DBLIST_PROP'")
viewlist.Execute


Set reclist = viewlist.Fetch

' delete any existing records
While Not (reclist Is Nothing)
For Each objDB In srv.Databases
If objDB.SystemObject = False Then

SQLCmd = ":Setvar MyServer """ & Session.Property("SERVER_PROP") & "\" & Session.Property("INSTANCE_PROP") & """"
SQLCmd = SQLCmd & ":Setvar MYDATABASE """ & Session.Property("DBCOMBO_PROP") & """"
SQLCmd = SQLCmd & ":Setvar execfolder """ & Cstr(Session.Property("APPDIR")) & "\SQL Scripts\" & """"
SQLCmd = SQLCmd & ":Setvar SQLCMDLOGINTIMEOUT 60 "
SQLCmd = SQLCmd & ":r $(execfolder) ""SQLScriptWrap.sql"""

' OpenTextFile Method needs a Const value
' ForAppending = 8 ForReading = 1, ForWriting = 2

Const ForWriting = 2

Set objFile = objFSO.OpenTextFile("""" & strDirectory & "\" & strFile & """", ForWriting, True)

' Writes strText every time you run this VBScript
objFile.Write(SQLCmd)
objFile.Close


' Bonus or cosmetic section to launch explorer to check file
If err.number = vbEmpty then
' Set objShell = CreateObject("WScript.Shell")
objShell.run ("sqlcmd -i " & """" & strDirectory & "\" & strFile & """ -o """ & strDirectory & "\SQLScript.log""")
Else
' WScript.echo "VBScript Error: " & err.Number
' Set wshshell = nothing
End If

Set viewlist = Database.OpenView( SQLCmd )
viewlist.Execute
viewlist.Close
End If
Next
viewlist.Modify 6, reclist ' 6 = delete
Set reclist = viewlist.Fetch
Wend

viewlist.Close

' open and execute a view to the ListBox table
Set viewlist = Database.OpenView("SELECT * FROM `ComboBox` WHERE `Property` ='DBCOMBO_PROP'")
viewlist.Execute

r = 0
For Each objDB In srv.Databases
If objDB.SystemObject = False Then
' ListBox record fields are Property, Order, Value, Text
r = r + 1
SQLCmd = "INSERT INTO `ComboBox` (`Property`,`Order`,`Value`,`Text`)"
SQLCmd = SQLCmd & " VALUES ('DBCOMBO_PROP','" & r & "','" & objDB.Name & "','"
SQLCmd = SQLCmd & objDB.Name & "') TEMPORARY"
Set viewlist = Database.OpenView( SQLCmd )
viewlist.Execute
viewlist.Close
End If
Next

set objTextFolder = nothing
set objTextFile = nothing
Set objShell = Nothing
'Set wshshell = nothing
'WScript.quit 0
sramesh
Posts: 20
Joined: Sat Mar 08, 2008 8:23 pm

Re: MsiProvideComponentFromDescriptor is returning: 0

__________________________
Action 12:41:05: RunSQLScripts.
Action start 12:41:05: RunSQLScripts.
MSI (s) (38:AC) [12:41:06:177]: Entering MsiProvideComponentFromDescriptor. Descriptor: H[XLiT}$i@8(605vMk!OLibrary>M5KDYSUnf(HA*L[xeX)y, PathBuf: A1ED44, pcchPathBuf: A1ED40, pcchArgsOffset: A1ECA0
MSI (s) (38:AC) [12:41:06:193]: MsiProvideComponentFromDescriptor called for component {997FA962-E067-11D1-9396-00A0C90F27F9}: returning harcoded oleaut32.dll value
MSI (s) (38:AC) [12:41:06:193]: MsiProvideComponentFromDescriptor is returning: 0
____________________________________

I apologize for misleading, the above part (shown in the install log) may not be a problem. I have other vb scripts that run during the UI custom action and they work fine. They also have the same kind of log entries.

This makes me believe that there is something wrong with my vbscript RunSQLScripts that I just posted as reply.

Can someone please help.

Thanks
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: MsiProvideComponentFromDescriptor is returning: 0

Hi,

It is hard to tell what the problem is. Please send the AIP file you are using and the script(s) (or a similar, simplified test case) to our support email address and I shall investigate the issue.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”