static BOOL create_package(LPWSTR path)
{
+ static const WCHAR slashW[] = {'\\',0};
DWORD len;
/* Prepare package */
if (!len)
return FALSE;
- /* lstrcatW does not work on win95 */
- path[len - 1] = '\\';
- memcpy(&path[len], szMsifile, sizeof(szMsifile));
+ lstrcatW(path, slashW);
+ lstrcatW(path, szMsifile);
return TRUE;
}
V_BSTR(&vararg) = SysAllocString(szValue);
hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, VT_BSTR);
- if (V_BSTR(&varresult))
- /* lstrcpyW is not implemented on Win95 (lstrlenW is though) */
- memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
V_I4(&vararg) = iValue;
hr = Installer_RegistryValue(hkey, szKey, vararg, &varresult, vtResult);
- if (SUCCEEDED(hr) && vtResult == VT_BSTR)
- memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (SUCCEEDED(hr) && vtResult == VT_BSTR) lstrcpyW(szString, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
V_BSTR(&vararg[0]) = SysAllocString(szAttribute);
hr = invoke(pInstaller, "ProductInfo", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
- if (V_BSTR(&varresult))
- memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
HRESULT hr;
hr = invoke(pInstaller, "Version", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
- if (V_BSTR(&varresult))
- memcpy(szVersion, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (V_BSTR(&varresult)) lstrcpyW(szVersion, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
V_BSTR(&vararg[0]) = SysAllocString(szName);
hr = invoke(pSession, "Property", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
- if (V_BSTR(&varresult))
- memcpy(szReturn, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (V_BSTR(&varresult)) lstrcpyW(szReturn, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
V_I4(&vararg[0]) = iField;
hr = invoke(pRecord, "StringData", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
- if (V_BSTR(&varresult))
- memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
V_I4(&vararg[0]) = iIndex;
hr = invoke(pStringList, "Item", DISPATCH_PROPERTYGET, &dispparams, &varresult, VT_BSTR);
- if (V_BSTR(&varresult))
- memcpy(szString, V_BSTR(&varresult), (lstrlenW(V_BSTR(&varresult)) + 1) * sizeof(WCHAR));
+ if (V_BSTR(&varresult)) lstrcpyW(szString, V_BSTR(&varresult));
VariantClear(&varresult);
return hr;
}
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
r = add_table_to_db(hdb, endlines1);
- if (r == ERROR_FUNCTION_FAILED)
- {
- /* win9x doesn't handle this case */
- skip("endlines not handled correctly.\n");
- MsiCloseHandle(hdb);
- DeleteFileA(msifile);
- return;
- }
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
r = add_table_to_db(hdb, endlines2);
- ok(r == ERROR_FUNCTION_FAILED,
- "Expected ERROR_FUNCTION_FAILED, got %d\n", r);
+ ok(r == ERROR_FUNCTION_FAILED, "Expected ERROR_FUNCTION_FAILED, got %d\n", r);
query = "SELECT * FROM `TestTable`";
r = MsiDatabaseOpenView(hdb, query, &view);
static const WCHAR letter_D[] = {'D',0};
static const WCHAR letter_a_ring[] = {'a',0x30a,0};
static const WCHAR letter_a_with_ring[] = {0xe5,0};
- static const WCHAR letter_a_broken[] = {'a',0xb0,0};
const char *query;
MSIHANDLE hdb = 0, hview = 0, hrec = 0;
UINT r;
sz = sizeof(bufferW) / sizeof(bufferW[0]);
r = MsiRecordGetStringW(hrec, 1, bufferW, &sz);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
- ok(!memcmp(bufferW, letter_a_ring, sizeof(letter_a_ring)) ||
- broken(!memcmp(bufferW, letter_a_broken, sizeof(letter_a_broken))) /* win9x */,
+ ok(!memcmp(bufferW, letter_a_ring, sizeof(letter_a_ring)),
"Expected %s, got %s\n", wine_dbgstr_w(letter_a_ring), wine_dbgstr_w(bufferW));
sz = sizeof(bufferW) / sizeof(bufferW[0]);
r = MsiRecordGetStringW(hrec, 2, bufferW, &sz);
static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD);
static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*);
-static BOOL on_win9x = FALSE;
static BOOL is_wow64;
static const BOOL is_64bit = sizeof(void *) > sizeof(int);
return FALSE;
}
-static BOOL check_win9x(void)
-{
- SC_HANDLE scm;
-
- scm = OpenSCManager(NULL, NULL, GENERIC_ALL);
- if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
- return TRUE;
-
- CloseServiceHandle(scm);
-
- return FALSE;
-}
-
static BOOL check_record(MSIHANDLE rec, UINT field, LPCSTR val)
{
CHAR buffer[0x20];
DWORD num, size, type;
REGSAM access = KEY_ALL_ACCESS;
- if (on_win9x)
- {
- win_skip("Services are not implemented on Win9x and WinMe\n");
- return;
- }
if (is_process_limited())
{
skip("process is limited\n");
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL);
- if (r == ERROR_SUCCESS) /* win9x has a problem with this */
- {
- 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\\caesar", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "File not installed\n");
- }
+ 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\\caesar", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
+ ok(delete_pf("msitest", FALSE), "File not installed\n");
delete_cab_files();
DeleteFile(msifile);
MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
r = MsiInstallProductA(msifile, NULL);
- if (r == ERROR_SUCCESS) /* win9x has a problem with this */
- {
- 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\\caesar", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "File not installed\n");
- }
+ 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\\caesar", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
+ ok(delete_pf("msitest", FALSE), "File not installed\n");
delete_cab_files();
DeleteFile(msifile);
MsiSetInternalUI(INSTALLUILEVEL_NONE | INSTALLUILEVEL_SOURCERESONLY, NULL);
r = MsiInstallProductA(msifile, NULL);
- if (r == ERROR_SUCCESS) /* win9x has a problem with this */
- {
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
- ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but execute-only was requested.\n");
- ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "File not installed\n");
- }
+ ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
+ ok(!delete_pf("msitest\\maximus", TRUE), "UI install occurred, but execute-only was requested.\n");
+ ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
+ ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
+ ok(delete_pf("msitest", FALSE), "File not installed\n");
delete_cab_files();
DeleteFile(msifile);
skip("Not enough rights to perform tests\n");
goto error;
}
- ok(r == ERROR_SUCCESS ||
- broken(r == ERROR_INSTALL_FAILURE), /* win9x */
- "Expected ERROR_SUCCESS, got %u\n", r);
- if (r == ERROR_SUCCESS)
- {
- ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
- }
+ 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\\maximus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
ok(compare_pf_data("msitest\\tiberius", "abcdefgh", sizeof("abcdefgh")), "Wrong file contents\n");
ok(delete_pf("msitest\\tiberius", TRUE), "File not installed\n");
CHAR keypath[MAX_PATH * 2], localpack[MAX_PATH];
REGSAM access = KEY_ALL_ACCESS;
- if (on_win9x)
- {
- win_skip("Different registry keys on Win9x and WinMe\n");
- return;
- }
if (is_process_limited())
{
skip("process is limited\n");
/* ALLUSERS property set to 2, conditioned on ALLUSERS = 1 */
r = MsiInstallProductA(msifile, "FULL=1");
- if (r == ERROR_SUCCESS)
- {
- /* Win9x/WinMe */
- win_skip("Win9x and WinMe act differently with respect to ALLUSERS\n");
-
- ok(delete_pf("msitest\\cabout\\new\\five.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\new", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\cabout\\four.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\cabout", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\changed\\three.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\changed", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\first\\two.txt", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\first", FALSE), "File not installed\n");
- ok(delete_pf("msitest\\filename", TRUE), "File not installed\n");
- ok(delete_pf("msitest\\one.txt", TRUE), "File installed\n");
- ok(delete_pf("msitest\\service.exe", TRUE), "File not installed\n");
- ok(delete_pf("msitest", FALSE), "File not installed\n");
-
- r = MsiInstallProductA(msifile, "REMOVE=ALL");
- ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
-
- delete_test_files();
- }
- else
- ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
+ ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
error:
delete_test_files();
HKEY hkey;
char path[MAX_PATH];
- if (on_win9x)
- {
- win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n");
- return;
- }
if (is_process_limited())
{
skip("process is limited\n");
HKEY hkey;
char path[MAX_PATH];
- if (on_win9x)
- {
- win_skip("Pending file renaming is implemented differently on Win9x and WinMe\n");
- return;
- }
if (is_process_limited())
{
skip("process is limited\n");
MSIHANDLE hdb = 0, record;
LPCSTR query;
UINT res;
- CHAR path[MAX_PATH], win9xpath[MAX_PATH];
+ CHAR path[MAX_PATH];
static const char prodcode[] = "{7DF88A49-996F-4EC8-A022-BF956F9B2CBB}";
if (is_process_limited())
res = MsiCloseHandle(record);
ok(res == ERROR_SUCCESS, "Failed to close record handle: %d\n", res);
- /* Delete the icon file after the handle is closed to make sure it's deleted on Win9x */
DeleteFileA("icon.ico");
res = MsiDatabaseCommit(hdb);
ok(res == ERROR_SUCCESS, "Failed to commit database: %d\n", res);
res = MsiInstallProductA(msifile, "PUBLISH_PRODUCT=1 ALLUSERS=1");
ok(res == ERROR_SUCCESS, "Failed to system-wide install: %d\n", res);
- /* win9x with MSI 2.0 installs the icon to a different folder, same as above */
- lstrcpyA(win9xpath, APP_DATA_DIR);
- lstrcatA(win9xpath, "\\");
- lstrcatA(win9xpath, "Microsoft\\Installer\\");
- lstrcatA(win9xpath, prodcode);
- lstrcatA(win9xpath, "\\testicon");
-
lstrcpyA(path, WINDOWS_DIR);
lstrcatA(path, "\\");
lstrcatA(path, "Installer\\");
lstrcatA(path, prodcode);
lstrcatA(path, "\\testicon");
- ok(file_exists(path) || file_exists(win9xpath),
- "System-wide icon file isn't where it's expected (%s)\n", path);
+ ok(file_exists(path), "System-wide icon file isn't where it's expected (%s)\n", path);
res = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(res == ERROR_SUCCESS, "Failed to uninstall system-wide\n");
{
UINT r;
- if (on_win9x)
- {
- win_skip("skipping sourcedir tests on win9x\n");
- return;
- }
if (is_process_limited())
{
skip("process is limited\n");
init_functionpointers();
- on_win9x = check_win9x();
-
if (pIsWow64Process)
pIsWow64Process(GetCurrentProcess(), &is_wow64);
if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
{
size = ExpandEnvironmentStringsA("%PATH%", NULL, 0);
- if (size == 0 && GetLastError() == ERROR_INVALID_PARAMETER)
- {
- /* Workaround for Win95 */
- CHAR tempbuf[1];
- size = ExpandEnvironmentStringsA("%PATH%", tempbuf, 0);
- }
pathvar = HeapAlloc(GetProcessHeap(), 0, size);
ExpandEnvironmentStringsA("%PATH%", pathvar, size);
RegQueryValueEx(hkey2, "RegisteredOwner", NULL, &type, (LPBYTE)path, &size);
}
- /* win9x doesn't set this */
- if (*path)
- {
- size = MAX_PATH;
- r = MsiGetProperty(hpkg, "USERNAME", buf, &size);
- ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r);
- ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf);
- }
+ size = MAX_PATH;
+ r = MsiGetProperty(hpkg, "USERNAME", buf, &size);
+ ok( r == ERROR_SUCCESS, "failed to get property: %d\n", r);
+ ok( !lstrcmp(buf, path), "Expected %s, got %s\n", path, buf);
size = MAX_PATH;
type = REG_SZ;
line, idx, ares[idx].gothandle,
(hfile != INVALID_HANDLE_VALUE));
- ok(lasterr == ares[idx].lasterr ||
- lasterr == 0xdeadbeef, /* win9x */
- "(%d, lasterr, %d): Expected %d, got %d\n",
+ ok(lasterr == ares[idx].lasterr, "(%d, lasterr, %d): Expected %d, got %d\n",
line, idx, ares[idx].lasterr, lasterr);
CloseHandle(hfile);
DWORD size;
LONG res;
UINT r;
- SC_HANDLE scm;
REGSAM access = KEY_ALL_ACCESS;
- scm = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
- if (!scm && (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED))
- {
- win_skip("Different registry keys on Win9x and WinMe\n");
- return;
- }
- CloseServiceHandle(scm);
-
GetCurrentDirectoryA(MAX_PATH, path);
lstrcatA(path, "\\");