https://bugs.winehq.org/show_bug.cgi?id=44213
Bug ID: 44213 Summary: Failure to run application: CoGetInstanceFromFile failed to get CLSID from a file Product: Wine Version: 1.8.7 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: ole32 Assignee: wine-bugs@winehq.org Reporter: jay.aurabind@gmail.com Distribution: ---
Created attachment 59995 --> https://bugs.winehq.org/attachment.cgi?id=59995 Window executable that wine is unable to run
When running a windows executable, wine exits giving the following error:
err:ole:CoGetInstanceFromFile failed to get CLSID from a file err:ole:apartment_getclassobject DllGetClassObject returned error 0x80004002 err:ole:create_server class {172bddf8-ceea-11d1-8b05-00600806d9b6} not registered err:ole:CoGetClassObject no class object {172bddf8-ceea-11d1-8b05-00600806d9b6} could be created for context 0x15
Application that crashes is attached
https://bugs.winehq.org/show_bug.cgi?id=44213
--- Comment #1 from Jay Aurabind jay.aurabind@gmail.com --- Official application source: http://www.automationdevelopers.com/p/shareholder-finder-for-indian-companie...
https://bugs.winehq.org/show_bug.cgi?id=44213
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download Status|UNCONFIRMED |NEW Ever confirmed|0 |1 URL| |http://www.automationdevelo | |pers.com/p/shareholder-find | |er-for-indian-companies.htm | |l
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Probably this part fails:
--- 0009:trace:ole:GetClassFile L"winmgmts:\\.\root\cimv2", 0x90ee90 0009:trace:ole:FileMonikerImpl_DecomposePath L"winmgmts:\\.\root\cimv2", (nil) 0009:err:ole:CoGetInstanceFromFile failed to get CLSID from a file ---
https://bugs.winehq.org/show_bug.cgi?id=44213
Sergio Gómez Del Real sdelreal@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sdelreal@codeweavers.com
--- Comment #3 from Sergio Gómez Del Real sdelreal@codeweavers.com --- It looks like the issue is related to TypeLibs. If you use native wbemdisp and wbemprox, the application starts.
https://bugs.winehq.org/show_bug.cgi?id=44213
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Severity|major |normal Summary|Failure to run application: |ShareHolder Finder 0.9.3.0 |CoGetInstanceFromFile |fails to generate unique |failed to get CLSID from a |hardware id, reports |file |'Error: The requested | |action with this object has | |failed.' (several | |'Win32_ComputerSystemProduc | |t' WMI class properties | |missing) Component|ole32 |wmi&wbemprox
--- Comment #4 from Anastasius Focht focht@gmx.net --- Hello folks,
the application uses WMI to query for various information to generate a unique hardware id. Unfortunately Wine lacks several properties in some WMI classes hence the application is failing.
This bug report is about 'Win32_ComputerSystemProduct' WMI class properties only.
--- snip --- $ WINEDEBUG=+seh,+relay,+wbemprox,+ole,+variant wine ./ShareHolderFinder.exe
log.txt 2>&1
... 0055:trace:wbemprox:wbem_services_ExecQuery 0x1759638, L"WQL", L"SELECT * FROM Win32_ComputerSystemProduct", 0x00000010, (nil), 0x90e6f8 ... 0055:trace:wbemprox:enum_class_object_Clone 0x176d548, 0x90ec10 0055:trace:wbemprox:EnumWbemClassObject_create 0x90ec10 ... 0055:trace:wbemprox:EnumWbemClassObject_create returning iface 0x176d450 ... 0055:trace:ole:DispCallFunc retval: 0x90eda0 {VT_ERROR: 00000000} 0055:trace:ole:ITypeInfo_fnInvoke [retval] value: 0x176d400 {VT_UNKNOWN|VT_BYREF 0x90ed90} 0055:trace:variant:VariantInit (0x90f0f8) 0055:trace:variant:VariantCopyInd (0x90f0f8 {VT_EMPTY},0x176d400 {VT_UNKNOWN|VT_BYREF 0x90ed90}) 0055:trace:variant:VariantClear (0x90f0f8 {VT_EMPTY}) 0055:trace:variant:VariantCopyInd returning 0x00000000, 0x90f0f8 {VT_UNKNOWN: 0x176d578} 0055:trace:variant:VARIANT_ClearInd (0x176d400 {VT_UNKNOWN|VT_BYREF 0x90ed90}) 0055:trace:variant:VariantClear (0x176d410 {VT_EMPTY}) ... 0055:trace:wbemprox:enum_class_object_Reset 0x176d450 ... 0055:trace:wbemprox:class_object_GetNames 0x176d400, (null), 00000000, (null), 0x90eafc ... 0055:trace:wbemprox:class_object_Get 0x176d400, L"IdentifyingNumber", 00000000, 0x90ec90, (nil), (nil) ... 0055:Call oleaut32.VariantClear(0090ec90) ret=00479fc6 0055:trace:variant:VariantClear (0x90ec90 {VT_BSTR: L"0"}) ... 0055:trace:variant:VariantClear (0x176d6e4 {VT_EMPTY}) 0055:Ret oleaut32.VariantClear() retval=00000000 ret=00456e96 ... 0055:trace:ole:ITypeInfo_fnAddRef (0x1761ce0)->ref is 2 0055:trace:ole:ITypeInfo_fnGetIDsOfNames (0x1761ce0) Name L"Name" cNames 1 ... 0055:Call user32.MessageBoxW(00030080,0176d988 L"Line 16964 (File "Z:\home\focht\Downloads\ShareHolderFinder.exe"):\n\n\nError: The requested action with this object has failed.",0176d6f0 L"AutoIt Error",00011010) ret=0046a0a4 ... --- snip ---
The application is actually an AutoIT Script encrypted and compiled to PE.
One can decompile/decrypt it using 'myAut2Exe - The Open Source AutoIT Script Decompiler'.
https://github.com/dzzie/myaut_contrib
The relevant part of decompiled script:
--- snip --- FUNC _WINAPI_UNIQUEHARDWAREID($IFLAGS=0) LOCAL $OSERVICE=OBJGET("winmgmts:\.\root\cimv2") IF NOT ISOBJ($OSERVICE)THEN RETURN SETERROR(1,0,"") LOCAL $OITEMS=$OSERVICE.ExecQuery("SELECT * FROM Win32_ComputerSystemProduct") IF NOT ISOBJ($OITEMS)THEN RETURN SETERROR(2,0,"") LOCAL $SHW="",$IEXTENDED=0 FOR $OPROPERTY IN $OITEMS $SHW&=$OPROPERTY.IdentifyingNumber $SHW&=$OPROPERTY.Name $SHW&=$OPROPERTY.SKUNumber $SHW&=$OPROPERTY.UUID $SHW&=$OPROPERTY.Vendor $SHW&=$OPROPERTY.Version NEXT $SHW=STRINGSTRIPWS($SHW,$STR_STRIPALL) IF NOT $SHW THEN RETURN SETERROR(3,0,"") LOCAL $STEXT IF BITAND($IFLAGS,1)THEN $OITEMS=$OSERVICE.ExecQuery("SELECT * FROM Win32_BIOS") IF NOT ISOBJ($OITEMS)THEN RETURN SETERROR(3,0,"") $STEXT="" FOR $OPROPERTY IN $OITEMS $STEXT&=$OPROPERTY.IdentificationCode $STEXT&=$OPROPERTY.Manufacturer $STEXT&=$OPROPERTY.Name $STEXT&=$OPROPERTY.SerialNumber $STEXT&=$OPROPERTY.SMBIOSMajorVersion $STEXT&=$OPROPERTY.SMBIOSMinorVersion NEXT $STEXT=STRINGSTRIPWS($STEXT,$STR_STRIPALL) IF $STEXT THEN $IEXTENDED+=1 $SHW&=$STEXT ENDIF ENDIF IF BITAND($IFLAGS,2)THEN $OITEMS=$OSERVICE.ExecQuery("SELECT * FROM Win32_Processor") IF NOT ISOBJ($OITEMS)THEN RETURN SETERROR(4,0,"") $STEXT="" FOR $OPROPERTY IN $OITEMS $STEXT&=$OPROPERTY.Architecture $STEXT&=$OPROPERTY.Family $STEXT&=$OPROPERTY.Level $STEXT&=$OPROPERTY.Manufacturer $STEXT&=$OPROPERTY.Name $STEXT&=$OPROPERTY.ProcessorId $STEXT&=$OPROPERTY.Revision $STEXT&=$OPROPERTY.Version NEXT $STEXT=STRINGSTRIPWS($STEXT,$STR_STRIPALL) IF $STEXT THEN $IEXTENDED+=2 $SHW&=$STEXT ENDIF ENDIF IF BITAND($IFLAGS,4)THEN $OITEMS=$OSERVICE.ExecQuery("SELECT * FROM Win32_PhysicalMedia") IF NOT ISOBJ($OITEMS)THEN RETURN SETERROR(5,0,"") $STEXT="" FOR $OPROPERTY IN $OITEMS SWITCH _WINAPI_GETDRIVEBUSTYPE($OPROPERTY.Tag) CASE 3,11 $STEXT&=$OPROPERTY.SerialNumber CASE ELSE ENDSWITCH NEXT $STEXT=STRINGSTRIPWS($STEXT,$STR_STRIPALL) IF $STEXT THEN $IEXTENDED+=4 $SHW&=$STEXT ENDIF ENDIF LOCAL $SHASH=__MD5($SHW) IF NOT $SHASH THEN RETURN SETERROR(6,0,"") RETURN SETEXTENDED($IEXTENDED,"{"&STRINGMID($SHASH,1,8)&"-"&STRINGMID($SHASH,9,4)&"-"&STRINGMID($SHASH,13,4)&"-"&STRINGMID($SHASH,17,4)&"-"&STRINGMID($SHASH,21,12)&"}") ENDFUNC --- snip ---
It expects several properties present in 'Win32_ComputerSystemProduct' WMI class:
* IdentifyingNumber * Name * SKUNumber * UUID * Vendor * Version
Source:
https://source.winehq.org/git/wine.git/blob/f9181daa1ddc2c10d3b6ddd4610bc142...
--- snip --- 440 static const struct column col_compsysproduct[] = 441 { 442 { prop_identifyingnumberW, CIM_STRING|COL_FLAG_KEY }, 443 { prop_uuidW, CIM_STRING|COL_FLAG_DYNAMIC } 444 }; ... 1410 static enum fill_status fill_compsysproduct( struct table *table, const struct expr *cond ) 1411 { 1412 struct record_computersystemproduct *rec; 1413 enum fill_status status = FILL_STATUS_UNFILTERED; 1414 UINT row = 0; 1415 1416 if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; 1417 1418 rec = (struct record_computersystemproduct *)table->data; 1419 rec->identifyingnumber = compsysproduct_identifyingnumberW; 1420 rec->uuid = get_compsysproduct_uuid(); 1421 if (!match_row( table, row, cond, &status )) free_row_values( table, row ); 1422 else row++; 1423 1424 TRACE("created %u rows\n", row); 1425 table->num_rows = row; 1426 return status; 1427 } ... --- snip ---
$ du -sh ShareHolderFinder.exe 1.2M ShareHolderFinder.exe
$ sha1sum ShareHolderFinder.exe 062235dda76f1aa1b5b41bf9b9d0f29aeca75174 ShareHolderFinder.exe
$ wine --version wine-3.1
Regards
https://bugs.winehq.org/show_bug.cgi?id=44213
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |7c0025b60851b67cae036ce7440 | |3e41d4088da9b
--- Comment #5 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=7c0025b60851b67cae036ce74...
https://bugs.winehq.org/show_bug.cgi?id=44213
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.2.
https://bugs.winehq.org/show_bug.cgi?id=44213
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=44213
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #7 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bugs included in 3.0.1.