https://bugs.winehq.org/show_bug.cgi?id=54532
--- Comment #7 from David Kahurani k.kahurani@gmail.com --- (In reply to Hans Leidekker from comment #6)
Does it skip this line on Windows or does it stop processing the file at this point?
I could be mistaken but it looks to me like it just creates an empty database.
I run
.\MsiDb.exe -f . -c -d db.msi ..\control.idt
on Windows(7) where control.idt is the file posted by the OP, without any edits.
I then run this code on the database:
#include <windows.h> #include <msiquery.h> #include <cstdio>
static UINT do_query(MSIHANDLE hdb, const char *query, MSIHANDLE *phrec) { MSIHANDLE hview = 0; UINT r, ret;
if (phrec) *phrec = 0;
/* open a select query */ r = MsiDatabaseOpenViewA(hdb, query, &hview); if (r != ERROR_SUCCESS) return r; r = MsiViewExecute(hview, 0); if (r != ERROR_SUCCESS) return r; ret = MsiViewFetch(hview, phrec); r = MsiViewClose(hview); if (r != ERROR_SUCCESS) return r; r = MsiCloseHandle(hview); if (r != ERROR_SUCCESS) return r; return ret; }
int main(int argc, char *argv[]) { MSIHANDLE hdb, hrec; DWORD sz; UINT r; const char *msifile = "db.msi"; char buffer[10000];
r = MsiOpenDatabaseA(msifile, MSIDBOPEN_CREATE, &hdb); if (r != ERROR_SUCCESS) printf("Couldn't open database \n");
r = do_query(hdb, "SELECT * FROM `control`", &hrec); if (r != ERROR_SUCCESS) printf("Couldn't query database \n");
buffer[0] = 0; sz = sizeof(buffer); r = MsiRecordGetStringA( hrec, 1, buffer, &sz); if (r != ERROR_SUCCESS) printf("failed to get string\n");
printf(" %s\n", buffer);
return 0; }
The database opens the file but the query does not run which I take to mean that the table doesn't exist which in turn means that the import didn't import anything.