[Bug 39463] New: Sanitas HealthCoach 1.4 (.NET 4.0 app) installer crashes in VBScript custom action

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Oct 16 14:59:06 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=39463

            Bug ID: 39463
           Summary: Sanitas HealthCoach 1.4 (.NET 4.0 app) installer
                    crashes in VBScript custom action
           Product: Wine
           Version: 1.7.53
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: vbscript
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

reported here: https://forum.winehq.org/viewtopic.php?f=8&t=25367

Prerequisite: 'winetricks -q dotnet40' (I don't use Wine-Mono).

The bootstrapper installer can be skipped.

--- snip ---
$ WINEDEBUG=+tid,+seh,+relay,+msi,+vbscript wine msiexec -i ./HealthCoach.msi
>>log.txt 2>&1
...
0034:Starting thread proc 0x7ec93b28 (arg=0x1d7874)
0034:trace:msi:ScriptThread custom action (34) started
0034:trace:msi:ACTION_CallScript function (null), script L"On Error Resume
Next\nConst HKEY_LOCAL_MACHINE = &H80000002\nstrComputer = \".\"\nSet
oReg=GetObject(\"winmgmts:{impersonationLevel=impersonate}!\\\\\" & strComputer
& \"\\root\\default:StdRegProv\") \nstrKeyPath =
\"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\"\nstrValueName =
\"Identifier\"\n"... 
...
0034:trace:vbscript:interp_string 
0034:Call oleaut32.SysAllocString(03e43ab0
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall") ret=f6d92d40
0034:Ret  oleaut32.SysAllocString() retval=03e4f5bc ret=f6d92d40
0034:trace:vbscript:interp_assign_ident L"strKeyPath"
...
0034:Call oleaut32.SysAllocString(03e43b3c L"HealthCoach") ret=f6d92d40
0034:Ret  oleaut32.SysAllocString() retval=03e41a34 ret=f6d92d40
0034:trace:vbscript:interp_equal 
0034:trace:vbscript:var_cmp 0x3e4fd50 {VT_BSTR: L""} 0x3e41948 {VT_BSTR:
L"HealthCoach"}
0034:Call oleaut32.VarCmp(03e4fd50,03e41948,00000000,00000000) ret=f6d935e6
0034:Ret  oleaut32.VarCmp() retval=00000000 ret=f6d935e6
0034:Call oleaut32.VariantClear(03e41948) ret=f6d8fed5
0034:Ret  oleaut32.VariantClear() retval=00000000 ret=f6d8fed5
0034:trace:vbscript:interp_jmp_false 108
0034:trace:vbscript:interp_enumnext 
0034:fixme:vbscript:interp_enumnext uninitialized
0034:warn:vbscript:exec_script Failed 80004005 in resume next mode
0034:trace:vbscript:exec_script unwind jmp 441 stack_off 16
0034:trace:seh:raise_exception code=c0000005 flags=0 addr=0xf6d94b46
ip=f6d94b46 tid=0034
0034:trace:seh:raise_exception  info[0]=00000000
0034:trace:seh:raise_exception  info[1]=f8bb0c94
0034:trace:seh:raise_exception  eax=00780045 ebx=0054e6a0 ecx=7ed732b9
edx=03e41a18 esi=00000000 edi=0054e708
0034:trace:seh:raise_exception  ebp=0054e748 esp=0054e670 cs=0023 ds=002b
es=002b fs=0063 gs=006b flags=00210206
0034:trace:seh:call_vectored_handlers calling handler at 0x791f5a7c
code=c0000005 flags=0 
--- snip ---

The VBScript code from 'CustomAction' table, extracted with ORCA:

--- snip ---
Action    Type    Source    Target    ExtendedType
s72    i2    S64    S255    I4
CustomAction    Action

SetInstallationPathToPreviousInstalllocation    38        On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer
& "\root\default:StdRegProv") 
strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"
strValueName = "Identifier"
oReg.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue
If (instr(strValue,"64")) Then
    strKeyPath =
"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
End If
If (instr(strValue,"x86")) Then
    strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
End If

oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
    strValueName = "DisplayName"
    oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath & "\\" &
CStr(subkey),strValueName,strValue
    If IsEmpty(strValue) or IsNull(strValue) Then
        strValue = ""
    End If
    If  strValue = "HealthCoach" Then
        strValueName = "InstallLocation"
        oReg.GetStringValue HKEY_LOCAL_MACHINE,strKeyPath & "\\" &
CStr(subkey),strValueName,strValue
        Session.Property("INSTALLDIR") = strValue
        Exit For
    End If
Next    
--- snip ---

'winetricks -q wsh57' works around (only 'vbscript' override needed here).

After successful installation the app requires more prerequisites.
I'm documenting them here to avoid end users reporting dupes.

The Application conveniently logs various things.

--- snip ---
$ ls -1sh .wine/drive_c/users/focht/Local\ Settings/Application\
Data/HealthCoach/Logs/
total 24K
4.0K ApplicationErrorLog.txt
 16K Data Migration.txt
4.0K Settings initialization.txt
--- snip ---

--- snip ---
16/10/2015 21:46:45:083 : The .Net Framework OleDb Data Provider requires
Microsoft Data Access Components(MDAC) version 2.6 or later.  Version  was
found currently installed.
16/10/2015 21:46:45:110 :    at System.Data.Common.ADP.CheckVersionMDAC(Boolean
ifodbcelseoledb)
   at System.Data.OleDb.OleDbConnectionInternal.VersionCheck()
   at System.Data.OleDb.OleDbConnectionInternal.GetObjectPool()
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
constr, OleDbConnection connection)
   at
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject)
   at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.OleDb.OleDbConnection.Open()
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Sanitas.HealthCoach.Data.ConnectionClass.ExecuteQuery(String strQuery)
   at Sanitas.HealthCoach.Data.SettingsRepository.GetApplicationVersion()
--- snip ---

-> 'winetricks -q mdac27'

--- snip ---
16/10/2015 21:48:15:717 : The 'Microsoft.Jet.OLEDB.4.0' provider is not
registered on the local machine.
16/10/2015 21:48:15:742 :    at
System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString
constr, DataSourceWrapper& datasrcWrapper)
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString
constr, OleDbConnection connection)
   at
System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningObject)
   at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection, DbConnectionPoolGroup poolGroup)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.OleDb.OleDbConnection.Open()
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Sanitas.HealthCoach.Data.ConnectionClass.ExecuteQuery(String strQuery)
   at Sanitas.HealthCoach.Data.SettingsRepository.GetApplicationVersion()
--- snip ---

-> 'winetricks -q jet40'

--- snip ---
$ pwd
/home/focht/.wine/drive_c/Program Files/HealthCoach

$ wine ./HealthCoach.exe
...
err:eventlog:ReportEventW L"Application: HealthCoach.exe\nFramework Version:
v4.0.30319\nDescription: The application requested process termination through
System.Environment.FailFast(string message).\nMessage: Unrecoverable system
error.\nStack:\n   at System.Environment.FailFast(System.String)\n   at
MS.Internal.Invariant.Fai"...
--- snip ---

-> 'winetricks -q corefonts' (bug 32323)

With those in place, the app works fine.

$ sha1sum HealthCoach.exe
19557cf541ddc171db1d1bbaffe11fcf566004a5  HealthCoach.exe

$ du -sh HealthCoach.exe
84M    HealthCoach.exe

$ wine --version
wine-1.7.53

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list