Author: akhaldi
Date: Sat Nov 21 16:45:05 2015
New Revision: 69996
URL:
http://svn.reactos.org/svn/reactos?rev=69996&view=rev
Log:
[MSI_WINETEST] Sync with Wine Staging 1.7.55. CORE-10536
Modified:
trunk/rostests/winetests/msi/action.c
trunk/rostests/winetests/msi/automation.c
trunk/rostests/winetests/msi/install.c
trunk/rostests/winetests/msi/msi.c
trunk/rostests/winetests/msi/package.c
Modified: trunk/rostests/winetests/msi/action.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/action.c?re…
==============================================================================
--- trunk/rostests/winetests/msi/action.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/action.c [iso-8859-1] Sat Nov 21 16:45:05 2015
@@ -214,7 +214,8 @@
"Var23\t+-MSITESTVAR19\t1\tOne\n"
"Var24\t+-MSITESTVAR19\t[~]2\tOne\n"
"Var25\t+-MSITESTVAR20\t1\tOne\n"
- "Var26\t+-MSITESTVAR20\t2[~]\tOne\n";
+ "Var26\t+-MSITESTVAR20\t2[~]\tOne\n"
+ "Var27\t+-MSITESTVAR21\t[~];1\tOne\n";
static const char service_install_dat[] =
"ServiceInstall\tName\tDisplayName\tServiceType\tStartType\tErrorControl\t"
@@ -1201,7 +1202,13 @@
"var2\t=+-MSITESTVAR2\t1\tenvvar\n"
"var3\t=MSITESTVAR3\t1\tenvvar\n"
"var4\t=-MSITESTVAR4\t\tenvvar\n"
- "var5\t=MSITESTVAR5\t\tenvvar\n";
+ "var5\t=MSITESTVAR5\t\tenvvar\n"
+ "Var6\t-MSITESTVAR6\t1;[~]\tenvvar\n"
+ "Var7\t-MSITESTVAR7\t[~];1\tenvvar\n"
+ "Var8\t-MSITESTVAR8\t1;[~]\tenvvar\n"
+ "Var9\t-MSITESTVAR9\t[~];1\tenvvar\n"
+ "Var10\t-MSITESTVAR10\t1\tenvvar\n"
+ "Var11\t-MSITESTVAR11\t2\tenvvar\n";
static const char res_install_exec_seq_dat[] =
"Action\tCondition\tSequence\n"
@@ -5135,6 +5142,7 @@
"1;;2;;", /* MSITESTVAR18 */
"1", /* MSITESTVAR19 */
"1", /* MSITESTVAR20 */
+ "1", /* MSITESTVAR21 */
NULL
};
UINT r;
@@ -5160,6 +5168,9 @@
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
res = RegSetValueExA(env, "MSITESTVAR2", 0, REG_SZ, (const BYTE
*)"0", 2);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+
+ res = RegSetValueExA(env, "MSITESTVAR21", 0, REG_SZ, (const BYTE
*)"1", 2);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
@@ -5254,6 +5265,7 @@
error:
RegDeleteValueA(env, "MSITESTVAR1");
RegDeleteValueA(env, "MSITESTVAR2");
+ RegDeleteValueA(env, "MSITESTVAR21");
RegCloseKey(env);
delete_test_files();
@@ -5838,10 +5850,14 @@
{
static const char keypath[] =
"Software\\Microsoft\\Installer\\Components\\0CBCFA296AC907244845745CEEB2F8AA";
+ static const char keypath2[] =
+
"Software\\Classes\\Installer\\Components\\0CBCFA296AC907244845745CEEB2F8AA";
UINT r;
LONG res;
HKEY key;
+ BYTE *data;
+ DWORD size;
if (is_process_limited())
{
@@ -5863,11 +5879,49 @@
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+ size = 0;
+ r =
MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
+ "english.txt", INSTALLMODE_DEFAULT, NULL, &size);
+ ok(r == ERROR_SUCCESS, "MsiProvideQualifiedCompontent returned %d\n", r);
+
res = RegOpenKeyA(HKEY_CURRENT_USER, keypath, &key);
ok(res == ERROR_SUCCESS, "components key not created %d\n", res);
- res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, NULL);
+ res = RegQueryValueExA(key, "english.txt", NULL, NULL, NULL, &size);
ok(res == ERROR_SUCCESS, "value not found %d\n", res);
+
+ data = HeapAlloc(GetProcessHeap(), 0, size);
+ res = RegQueryValueExA(key, "english.txt", NULL, NULL, data, &size);
+ ok(res == ERROR_SUCCESS, "value not found %d\n", res);
+ RegCloseKey(key);
+
+ res = RegDeleteKeyA(HKEY_CURRENT_USER, keypath);
+ ok(res == ERROR_SUCCESS, "RegDeleteKey failed %d\n", res);
+
+ res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, keypath2, 0, NULL,
REG_OPTION_NON_VOLATILE,
+ MAXIMUM_ALLOWED | KEY_WOW64_64KEY, NULL, &key, NULL );
+ ok(res == ERROR_SUCCESS, "RegCreateKeyEx failed %d\n", res);
+ res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
+ ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res);
+ RegCloseKey(key);
+
+ size = 0;
+ r =
MsiProvideQualifiedComponentA("{92AFCBC0-9CA6-4270-8454-47C5EE2B8FAA}",
+ "english.txt", INSTALLMODE_DEFAULT, NULL, &size);
+ ok(r == ERROR_SUCCESS, "MsiProvideQualifiedCompontent returned %d\n", r);
+
+ if (pRegDeleteKeyExA)
+ res = pRegDeleteKeyExA(HKEY_LOCAL_MACHINE, keypath2, KEY_WOW64_64KEY, 0);
+ else
+ res = RegDeleteKeyA(HKEY_LOCAL_MACHINE, keypath2);
+ ok(res == ERROR_SUCCESS, "RegDeleteKey failed %d\n", res);
+
+ res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &key);
+ ok(res == ERROR_SUCCESS, "RegCreateKey failed %d\n", res);
+
+ res = RegSetValueExA(key, "english.txt", 0, REG_MULTI_SZ, data, size);
+ ok(res == ERROR_SUCCESS, "RegSetValueEx failed %d\n", res);
+ HeapFree(GetProcessHeap(), 0, data);
RegCloseKey(key);
r = MsiInstallProductA(msifile, "REMOVE=ALL");
@@ -6188,6 +6242,12 @@
RegSetValueExA(key, "MSITESTVAR3", 0, REG_SZ, (const BYTE *)"1",
2);
RegSetValueExA(key, "MSITESTVAR4", 0, REG_SZ, (const BYTE *)"1",
2);
RegSetValueExA(key, "MSITESTVAR5", 0, REG_SZ, (const BYTE *)"1",
2);
+ RegSetValueExA(key, "MSITESTVAR6", 0, REG_SZ, (const BYTE
*)"1;2", 4);
+ RegSetValueExA(key, "MSITESTVAR7", 0, REG_SZ, (const BYTE
*)"1;2", 4);
+ RegSetValueExA(key, "MSITESTVAR8", 0, REG_SZ, (const BYTE
*)"2;1;0", 6);
+ RegSetValueExA(key, "MSITESTVAR9", 0, REG_SZ, (const BYTE
*)"0;1;2", 6);
+ RegSetValueExA(key, "MSITESTVAR10", 0, REG_SZ, (const BYTE *)"1",
2);
+ RegSetValueExA(key, "MSITESTVAR11", 0, REG_SZ, (const BYTE *)"1",
2);
RegCloseKey(key);
@@ -6276,6 +6336,57 @@
ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
ok(!lstrcmpA(buffer, "1"), "expected \"1\", got
\"%s\"\n", buffer);
RegDeleteValueA(key, "MSITESTVAR5");
+
+ type = REG_NONE;
+ buffer[0] = 0;
+ size = sizeof(buffer);
+ res = RegQueryValueExA(key, "MSITESTVAR6", NULL, &type, (LPBYTE)buffer,
&size);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
+ ok(!lstrcmpA(buffer, "2"), "expected \"2\", got
\"%s\"\n", buffer);
+ RegDeleteValueA(key, "MSITESTVAR6");
+
+ type = REG_NONE;
+ buffer[0] = 0;
+ size = sizeof(buffer);
+ res = RegQueryValueExA(key, "MSITESTVAR7", NULL, &type, (LPBYTE)buffer,
&size);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
+ ok(!lstrcmpA(buffer, "2"), "expected \"2\", got
\"%s\"\n", buffer);
+ RegDeleteValueA(key, "MSITESTVAR7");
+
+ type = REG_NONE;
+ buffer[0] = 0;
+ size = sizeof(buffer);
+ res = RegQueryValueExA(key, "MSITESTVAR8", NULL, &type, (LPBYTE)buffer,
&size);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
+ ok(!lstrcmpA(buffer, "2;0"), "expected \"2;0\", got
\"%s\"\n", buffer);
+ RegDeleteValueA(key, "MSITESTVAR8");
+
+ type = REG_NONE;
+ buffer[0] = 0;
+ size = sizeof(buffer);
+ res = RegQueryValueExA(key, "MSITESTVAR9", NULL, &type, (LPBYTE)buffer,
&size);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
+ ok(!lstrcmpA(buffer, "0;2"), "expected \"0;2\", got
\"%s\"\n", buffer);
+ RegDeleteValueA(key, "MSITESTVAR9");
+
+ type = REG_NONE;
+ buffer[0] = 0;
+ size = sizeof(buffer);
+ res = RegQueryValueExA(key, "MSITESTVAR10", NULL, &type,
(LPBYTE)buffer, &size);
+ ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n",
res);
+
+ type = REG_NONE;
+ buffer[0] = 0;
+ size = sizeof(buffer);
+ res = RegQueryValueExA(key, "MSITESTVAR11", NULL, &type,
(LPBYTE)buffer, &size);
+ ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
+ ok(type == REG_SZ, "expected REG_SZ, got %u\n", type);
+ ok(!lstrcmpA(buffer, "1"), "expected \"1\", got
\"%s\"\n", buffer);
+ RegDeleteValueA(key, "MSITESTVAR11");
ok(!delete_pf("msitest\\envvar.txt", TRUE), "file not
removed\n");
ok(!delete_pf("msitest", FALSE), "directory not removed\n");
@@ -6286,6 +6397,12 @@
RegDeleteValueA(key, "MSITESTVAR3");
RegDeleteValueA(key, "MSITESTVAR4");
RegDeleteValueA(key, "MSITESTVAR5");
+ RegDeleteValueA(key, "MSITESTVAR6");
+ RegDeleteValueA(key, "MSITESTVAR7");
+ RegDeleteValueA(key, "MSITESTVAR8");
+ RegDeleteValueA(key, "MSITESTVAR9");
+ RegDeleteValueA(key, "MSITESTVAR10");
+ RegDeleteValueA(key, "MSITESTVAR11");
RegCloseKey(key);
DeleteFileA("msitest\\envvar.txt");
Modified: trunk/rostests/winetests/msi/automation.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/automation.…
==============================================================================
--- trunk/rostests/winetests/msi/automation.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/automation.c [iso-8859-1] Sat Nov 21 16:45:05 2015
@@ -1127,6 +1127,25 @@
return invoke(pInstaller, "UILevel", DISPATCH_PROPERTYPUT, &dispparams,
&varresult, VT_EMPTY);
}
+static HRESULT Installer_SummaryInformation(BSTR PackagePath, int UpdateCount, IDispatch
**pSumInfo)
+{
+ VARIANT varresult;
+ VARIANTARG vararg[2];
+ DISPPARAMS dispparams = {vararg, NULL, sizeof(vararg)/sizeof(VARIANTARG), 0};
+ HRESULT hr;
+
+ VariantInit(&vararg[1]);
+ V_VT(&vararg[1]) = VT_BSTR;
+ V_BSTR(&vararg[1]) = SysAllocString(PackagePath);
+ VariantInit(&vararg[0]);
+ V_VT(&vararg[0]) = VT_I4;
+ V_I4(&vararg[0]) = UpdateCount;
+
+ hr = invoke(pInstaller, "SummaryInformation", DISPATCH_PROPERTYGET,
&dispparams, &varresult, VT_DISPATCH);
+ *pSumInfo = V_DISPATCH(&varresult);
+ return hr;
+}
+
static HRESULT Session_Installer(IDispatch *pSession, IDispatch **pInst)
{
VARIANT varresult;
@@ -1184,7 +1203,7 @@
return hr;
}
-static HRESULT Session_ModeGet(IDispatch *pSession, int iFlag, BOOL *pMode)
+static HRESULT Session_ModeGet(IDispatch *pSession, int iFlag, VARIANT_BOOL *mode)
{
VARIANT varresult;
VARIANTARG vararg[1];
@@ -1196,12 +1215,12 @@
V_I4(&vararg[0]) = iFlag;
hr = invoke(pSession, "Mode", DISPATCH_PROPERTYGET, &dispparams,
&varresult, VT_BOOL);
- *pMode = V_BOOL(&varresult);
+ *mode = V_BOOL(&varresult);
VariantClear(&varresult);
return hr;
}
-static HRESULT Session_ModePut(IDispatch *pSession, int iFlag, BOOL bMode)
+static HRESULT Session_ModePut(IDispatch *pSession, int iFlag, VARIANT_BOOL mode)
{
VARIANT varresult;
VARIANTARG vararg[2];
@@ -1213,7 +1232,7 @@
V_I4(&vararg[1]) = iFlag;
VariantInit(&vararg[0]);
V_VT(&vararg[0]) = VT_BOOL;
- V_BOOL(&vararg[0]) = bMode;
+ V_BOOL(&vararg[0]) = mode;
return invoke(pSession, "Mode", DISPATCH_PROPERTYPUT, &dispparams,
&varresult, VT_EMPTY);
}
@@ -1856,7 +1875,7 @@
WCHAR stringw[MAX_PATH];
CHAR string[MAX_PATH];
UINT len;
- BOOL bool;
+ VARIANT_BOOL bool;
int myint;
IDispatch *pDatabase = NULL, *pInst = NULL, *record = NULL;
ULONG refs_before, refs_after;
@@ -1924,15 +1943,15 @@
ok(!bool, "Maintenance mode is %d\n", bool);
/* Session::Mode, put */
- hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, TRUE);
+ hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, VARIANT_TRUE);
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
hr = Session_ModeGet(pSession, MSIRUNMODE_REBOOTATEND, &bool);
ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
ok(bool, "Reboot at end session mode is %d, expected 1\n", bool);
- hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, FALSE); /* set it again so we
don't reboot */
+ hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTATEND, VARIANT_FALSE); /* set it
again so we don't reboot */
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
- hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, TRUE);
+ hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, VARIANT_TRUE);
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
ok_exception(hr, szModeFlag);
@@ -1940,11 +1959,11 @@
ok(hr == S_OK, "Session_ModeGet failed, hresult 0x%08x\n", hr);
ok(bool, "Reboot now mode is %d, expected 1\n", bool);
- hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, FALSE); /* set it again so we
don't reboot */
+ hr = Session_ModePut(pSession, MSIRUNMODE_REBOOTNOW, VARIANT_FALSE); /* set it again
so we don't reboot */
ok(hr == S_OK, "Session_ModePut failed, hresult 0x%08x\n", hr);
ok_exception(hr, szModeFlag);
- hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, TRUE);
+ hr = Session_ModePut(pSession, MSIRUNMODE_MAINTENANCE, VARIANT_TRUE);
ok(hr == DISP_E_EXCEPTION, "Session_ModePut failed, hresult 0x%08x\n",
hr);
ok_exception(hr, szModeFlag);
@@ -2601,7 +2620,7 @@
static const WCHAR szIntegerDataException[] = {
'I','n','t','e','g','e','r','D','a','t','a',',','F','i','e','l','d',0
};
WCHAR szPath[MAX_PATH];
HRESULT hr;
- IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL;
+ IDispatch *pSession = NULL, *pDatabase = NULL, *pRecord = NULL, *pStringList = NULL,
*pSumInfo = NULL;
int iValue, iCount;
if (!pInstaller) return;
@@ -2676,6 +2695,18 @@
test_Database(pDatabase, FALSE);
IDispatch_Release(pDatabase);
}
+
+ /* Installer::SummaryInformation */
+ hr = Installer_SummaryInformation(szPath, 0, &pSumInfo);
+ ok(hr == S_OK, "Installer_SummaryInformation failed, hresult 0x%08x\n",
hr);
+ if (hr == S_OK)
+ {
+ test_SummaryInfo(pSumInfo, summary_info,
sizeof(summary_info)/sizeof(msi_summary_info), TRUE);
+ IDispatch_Release(pSumInfo);
+ }
+
+ hr = Installer_SummaryInformation(NULL, 0, &pSumInfo);
+ ok(hr == DISP_E_EXCEPTION, "Installer_SummaryInformation failed, hresult
0x%08x\n", hr);
/* Installer::RegistryValue */
test_Installer_RegistryValue();
Modified: trunk/rostests/winetests/msi/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/install.c?r…
==============================================================================
--- trunk/rostests/winetests/msi/install.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/install.c [iso-8859-1] Sat Nov 21 16:45:05 2015
@@ -1110,10 +1110,16 @@
"CustomAction\tAction\n"
"TestPrimaryVolumePath0\t19\t\tPrimaryVolumePath set before
CostFinalize\t\n"
"TestPrimaryVolumeSpaceAvailable0\t19\t\tPrimaryVolumeSpaceAvailable set before
CostFinalize\t\n"
+ "TestPrimaryVolumeSpaceRequired0\t19\t\tPrimaryVolumeSpaceRequired set before
CostFinalize\t\n"
+ "TestPrimaryVolumeSpaceRemaining0\t19\t\tPrimaryVolumeSpaceRemaining set before
CostFinalize\t\n"
"TestPrimaryVolumePath1\t19\t\tPrimaryVolumePath set before
InstallValidate\t\n"
"TestPrimaryVolumeSpaceAvailable1\t19\t\tPrimaryVolumeSpaceAvailable not set
before InstallValidate\t\n"
+ "TestPrimaryVolumeSpaceRequired1\t19\t\tPrimaryVolumeSpaceRequired not set
before InstallValidate\t\n"
+ "TestPrimaryVolumeSpaceRemaining1\t19\t\tPrimaryVolumeSpaceRemaining not set
before InstallValidate\t\n"
"TestPrimaryVolumePath2\t19\t\tPrimaryVolumePath not set after
InstallValidate\t\n"
- "TestPrimaryVolumeSpaceAvailable2\t19\t\tPrimaryVolumeSpaceAvailable not set
after InstallValidate\t\n";
+ "TestPrimaryVolumeSpaceAvailable2\t19\t\tPrimaryVolumeSpaceAvailable not set
after InstallValidate\t\n"
+ "TestPrimaryVolumeSpaceRequired2\t19\t\tPrimaryVolumeSpaceRequired not set after
InstallValidate\t\n"
+ "TestPrimaryVolumeSpaceRemaining2\t19\t\tPrimaryVolumeSpaceRemaining not set
after InstallValidate\t\n";
static const char vp_install_exec_seq_dat[] =
"Action\tCondition\tSequence\n"
@@ -1124,12 +1130,18 @@
"FileCost\t\t300\n"
"TestPrimaryVolumePath0\tPrimaryVolumePath AND NOT REMOVE\t400\n"
"TestPrimaryVolumeSpaceAvailable0\tPrimaryVolumeSpaceAvailable AND NOT
REMOVE\t500\n"
+ "TestPrimaryVolumeSpaceRequired0\tPrimaryVolumeSpaceRequired AND NOT
REMOVE\t510\n"
+ "TestPrimaryVolumeSpaceRemaining0\tPrimaryVolumeSpaceRemaining AND NOT
REMOVE\t520\n"
"CostFinalize\t\t600\n"
"TestPrimaryVolumePath1\tPrimaryVolumePath AND NOT REMOVE\t600\n"
"TestPrimaryVolumeSpaceAvailable1\tNOT PrimaryVolumeSpaceAvailable AND NOT
REMOVE\t800\n"
+ "TestPrimaryVolumeSpaceRequired1\tNOT PrimaryVolumeSpaceRequired AND NOT
REMOVE\t810\n"
+ "TestPrimaryVolumeSpaceRemaining1\tNOT PrimaryVolumeSpaceRemaining AND NOT
REMOVE\t820\n"
"InstallValidate\t\t900\n"
"TestPrimaryVolumePath2\tNOT PrimaryVolumePath AND NOT REMOVE\t1000\n"
"TestPrimaryVolumeSpaceAvailable2\tNOT PrimaryVolumeSpaceAvailable AND NOT
REMOVE\t1100\n"
+ "TestPrimaryVolumeSpaceRequired2\tNOT PrimaryVolumeSpaceRequired AND NOT
REMOVE\t1110\n"
+ "TestPrimaryVolumeSpaceRemaining2\tNOT PrimaryVolumeSpaceRemaining AND NOT
REMOVE\t1120\n"
"InstallInitialize\t\t1200\n"
"ProcessComponents\t\t1300\n"
"RemoveFiles\t\t1400\n"
@@ -3157,6 +3169,11 @@
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL);
+ if (r == ERROR_INSTALL_FAILURE)
+ {
+ win_skip("unprivileged user?\n");
+ goto error;
+ }
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
if (r == ERROR_SUCCESS)
{
@@ -3165,6 +3182,8 @@
ok(delete_pf("msitest\\maximus", TRUE), "File not
installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
}
+
+error:
delete_cab_files();
DeleteFileA(msifile);
}
@@ -3179,6 +3198,12 @@
MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
r = MsiInstallProductA(msifile, NULL);
+ if (r == ERROR_INSTALL_FAILURE)
+ {
+ win_skip("unprivileged user?\n");
+ goto error;
+ }
+
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
if (r == ERROR_SUCCESS)
{
@@ -3187,6 +3212,8 @@
ok(delete_pf("msitest\\augustus", TRUE), "File not
installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
}
+
+error:
delete_cab_files();
DeleteFileA(msifile);
}
@@ -4687,6 +4714,16 @@
ok(delete_pf("msitest\\augustus", TRUE), "File not
installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
+ r = MsiInstallProductA(msifile, "Prop1=\"Copyright \"\"My
Company\"\" 2015\" MyProp=42");
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+ ok(delete_pf("msitest\\augustus", TRUE), "File not
installed\n");
+ ok(delete_pf("msitest", FALSE), "Directory not created\n");
+
+ r = MsiInstallProductA(msifile,
"Prop1=\"\"\"install.exe\"\" /Install\"
MyProp=\"42\"");
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+ ok(delete_pf("msitest\\augustus", TRUE), "File not
installed\n");
+ ok(delete_pf("msitest", FALSE), "Directory not created\n");
+
error:
DeleteFileA(msifile);
DeleteFileA("msitest\\augustus");
Modified: trunk/rostests/winetests/msi/msi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/msi.c?rev=6…
==============================================================================
--- trunk/rostests/winetests/msi/msi.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/msi.c [iso-8859-1] Sat Nov 21 16:45:05 2015
@@ -48,6 +48,8 @@
static INSTALLSTATE (WINAPI *pMsiGetComponentPathA)
(LPCSTR, LPCSTR, LPSTR, DWORD*);
+static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)
+ (LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCONTEXT, LPSTR, LPDWORD);
static INSTALLSTATE (WINAPI *pMsiProvideComponentA)
(LPCSTR, LPCSTR, LPCSTR, DWORD, LPSTR, LPDWORD);
static INSTALLSTATE (WINAPI *pMsiProvideComponentW)
@@ -90,6 +92,7 @@
trace("GetProcAddress(%s) failed\n", #func);
GET_PROC(hmsi, MsiGetComponentPathA)
+ GET_PROC(hmsi, MsiGetComponentPathExA);
GET_PROC(hmsi, MsiProvideComponentA)
GET_PROC(hmsi, MsiProvideComponentW)
GET_PROC(hmsi, MsiGetFileHashA)
@@ -4224,12 +4227,11 @@
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
/* pcchLangBuf not big enough */
- langsz = 3;
+ langsz = 4;
lstrcpyA(lang, "lang");
r = MsiGetFileVersionA(path, NULL, NULL, lang, &langsz);
ok(r == ERROR_MORE_DATA, "Expected ERROR_MORE_DATA, got %d\n", r);
- ok(!strncmp(lang, langcheck, 2),
- "Expected first character of \"%s\", got \"%s\"\n",
langcheck, lang);
+ ok(lstrcmpA(lang, "lang"), "lang not set\n");
ok(langsz >= langchecksz, "Expected %d >= %d\n", langsz,
langchecksz);
/* pcchVersionBuf big enough, pcchLangBuf not big enough */
@@ -4250,7 +4252,7 @@
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(versz == verchecksz, "Expected %d, got %d\n", verchecksz, versz);
ok(langsz >= langchecksz && langsz < MAX_PATH, "Expected %d >=
%d\n", langsz, langchecksz);
- ok(lstrcmpA(lang, "lang"), "lang buffer not modified\n");
+ ok(strstr(lang, langcheck) != NULL, "expected %s in %s\n", langcheck,
lang);
/* NULL pcchVersionBuf and pcchLangBuf */
r = MsiGetFileVersionA(path, version, NULL, lang, NULL);
@@ -14432,7 +14434,8 @@
test_lastusedsource();
test_setpropertyfolder();
test_sourcedir_props();
- test_concurrentinstall();
+ if (pMsiGetComponentPathExA)
+ test_concurrentinstall();
test_command_line_parsing();
SetCurrentDirectoryA(prev_path);
Modified: trunk/rostests/winetests/msi/package.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/package.c?r…
==============================================================================
--- trunk/rostests/winetests/msi/package.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/msi/package.c [iso-8859-1] Sat Nov 21 16:45:05 2015
@@ -3414,7 +3414,7 @@
/* reinstall the product */
r = MsiInstallProductA(msifile3, "REINSTALL=ALL");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
+ ok(r == ERROR_SUCCESS || broken(r == ERROR_INSTALL_FAILURE) /* win2k3 */,
"Expected ERROR_SUCCESS, got %d\n", r);
state = MsiQueryFeatureStateA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}",
"five");
ok(state == INSTALLSTATE_UNKNOWN, "state = %d\n", state);