Commit 69154f03 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

ntdll: Default to Windows 10.

parent 2ccc2a42
...@@ -2137,7 +2137,7 @@ static void test_condition(void) ...@@ -2137,7 +2137,7 @@ static void test_condition(void)
DeleteFileA(msifile); DeleteFileA(msifile);
} }
static void check_prop(MSIHANDLE hpkg, const char *prop, const char *expect, int match_case) static void check_prop(MSIHANDLE hpkg, const char *prop, const char *expect, int match_case, int todo_value)
{ {
char buffer[MAX_PATH] = "x"; char buffer[MAX_PATH] = "x";
DWORD sz = sizeof(buffer); DWORD sz = sizeof(buffer);
...@@ -2145,9 +2145,9 @@ static void check_prop(MSIHANDLE hpkg, const char *prop, const char *expect, int ...@@ -2145,9 +2145,9 @@ static void check_prop(MSIHANDLE hpkg, const char *prop, const char *expect, int
ok(!r, "'%s': got %u\n", prop, r); ok(!r, "'%s': got %u\n", prop, r);
ok(sz == lstrlenA(buffer), "'%s': expected %u, got %lu\n", prop, lstrlenA(buffer), sz); ok(sz == lstrlenA(buffer), "'%s': expected %u, got %lu\n", prop, lstrlenA(buffer), sz);
if (match_case) if (match_case)
ok(!strcmp(buffer, expect), "'%s': expected '%s', got '%s'\n", prop, expect, buffer); todo_wine_if (todo_value) ok(!strcmp(buffer, expect), "'%s': expected '%s', got '%s'\n", prop, expect, buffer);
else else
ok(!_stricmp(buffer, expect), "'%s': expected '%s', got '%s'\n", prop, expect, buffer); todo_wine_if (todo_value) ok(!_stricmp(buffer, expect), "'%s': expected '%s', got '%s'\n", prop, expect, buffer);
} }
static void test_props(void) static void test_props(void)
...@@ -2220,29 +2220,29 @@ static void test_props(void) ...@@ -2220,29 +2220,29 @@ static void test_props(void)
r = MsiSetPropertyA( hpkg, "=", "asdf" ); r = MsiSetPropertyA( hpkg, "=", "asdf" );
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
check_prop(hpkg, "=", "asdf", 1); check_prop(hpkg, "=", "asdf", 1, 0);
r = MsiSetPropertyA( hpkg, " ", "asdf" ); r = MsiSetPropertyA( hpkg, " ", "asdf" );
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
check_prop(hpkg, " ", "asdf", 1); check_prop(hpkg, " ", "asdf", 1, 0);
r = MsiSetPropertyA( hpkg, "'", "asdf" ); r = MsiSetPropertyA( hpkg, "'", "asdf" );
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
check_prop(hpkg, "'", "asdf", 1); check_prop(hpkg, "'", "asdf", 1, 0);
/* set empty values */ /* set empty values */
r = MsiSetPropertyA( hpkg, "boo", NULL ); r = MsiSetPropertyA( hpkg, "boo", NULL );
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
check_prop(hpkg, "boo", "", 1); check_prop(hpkg, "boo", "", 1, 0);
r = MsiSetPropertyA( hpkg, "boo", "" ); r = MsiSetPropertyA( hpkg, "boo", "" );
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
check_prop(hpkg, "boo", "", 1); check_prop(hpkg, "boo", "", 1, 0);
/* set a non-empty value */ /* set a non-empty value */
r = MsiSetPropertyA( hpkg, "boo", "xyz" ); r = MsiSetPropertyA( hpkg, "boo", "xyz" );
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
check_prop(hpkg, "boo", "xyz", 1); check_prop(hpkg, "boo", "xyz", 1, 0);
r = MsiGetPropertyA(hpkg, "boo", NULL, NULL); r = MsiGetPropertyA(hpkg, "boo", NULL, NULL);
ok(!r, "got %u\n", r); ok(!r, "got %u\n", r);
...@@ -2317,10 +2317,10 @@ static void test_props(void) ...@@ -2317,10 +2317,10 @@ static void test_props(void)
ok(sz == 3, "got size %lu\n", sz); ok(sz == 3, "got size %lu\n", sz);
/* properties are case-sensitive */ /* properties are case-sensitive */
check_prop(hpkg, "BOO", "", 1); check_prop(hpkg, "BOO", "", 1, 0);
/* properties set in Property table should work */ /* properties set in Property table should work */
check_prop(hpkg, "MetadataCompName", "Photoshop.dll", 1); check_prop(hpkg, "MetadataCompName", "Photoshop.dll", 1, 0);
MsiCloseHandle( hpkg ); MsiCloseHandle( hpkg );
DeleteFileA(msifile); DeleteFileA(msifile);
...@@ -5734,70 +5734,70 @@ static void test_installprops(void) ...@@ -5734,70 +5734,70 @@ static void test_installprops(void)
GetNativeSystemInfo(&si); GetNativeSystemInfo(&si);
sprintf(buf, "%d", LOBYTE(LOWORD(GetVersion())) * 100 + HIBYTE(LOWORD(GetVersion()))); sprintf(buf, "%d", LOBYTE(LOWORD(GetVersion())) * 100 + HIBYTE(LOWORD(GetVersion())));
check_prop(hpkg, "VersionNT", buf, 1); check_prop(hpkg, "VersionNT", buf, 1, 1);
if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
{ {
sprintf(buf, "%d", si.wProcessorLevel); sprintf(buf, "%d", si.wProcessorLevel);
check_prop(hpkg, "Intel", buf, 1); check_prop(hpkg, "Intel", buf, 1, 0);
check_prop(hpkg, "MsiAMD64", buf, 1); check_prop(hpkg, "MsiAMD64", buf, 1, 0);
check_prop(hpkg, "Msix64", buf, 1); check_prop(hpkg, "Msix64", buf, 1, 0);
sprintf(buf, "%d", LOBYTE(LOWORD(GetVersion())) * 100 + HIBYTE(LOWORD(GetVersion()))); sprintf(buf, "%d", LOBYTE(LOWORD(GetVersion())) * 100 + HIBYTE(LOWORD(GetVersion())));
check_prop(hpkg, "VersionNT64", buf, 1); check_prop(hpkg, "VersionNT64", buf, 1, 1);
GetSystemDirectoryA(path, MAX_PATH); GetSystemDirectoryA(path, MAX_PATH);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "System64Folder", path, 0); check_prop(hpkg, "System64Folder", path, 0, 0);
GetSystemWow64DirectoryA(path, MAX_PATH); GetSystemWow64DirectoryA(path, MAX_PATH);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "SystemFolder", path, 0); check_prop(hpkg, "SystemFolder", path, 0, 0);
size = MAX_PATH; size = MAX_PATH;
r = RegQueryValueExA(pathkey, "ProgramFilesDir (x86)", 0, &type, (BYTE *)path, &size); r = RegQueryValueExA(pathkey, "ProgramFilesDir (x86)", 0, &type, (BYTE *)path, &size);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "ProgramFilesFolder", path, 0); check_prop(hpkg, "ProgramFilesFolder", path, 0, 0);
size = MAX_PATH; size = MAX_PATH;
RegQueryValueExA(pathkey, "ProgramFilesDir", 0, &type, (BYTE *)path, &size); RegQueryValueExA(pathkey, "ProgramFilesDir", 0, &type, (BYTE *)path, &size);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "ProgramFiles64Folder", path, 0); check_prop(hpkg, "ProgramFiles64Folder", path, 0, 0);
size = MAX_PATH; size = MAX_PATH;
RegQueryValueExA(pathkey, "CommonFilesDir (x86)", 0, &type, (BYTE *)path, &size); RegQueryValueExA(pathkey, "CommonFilesDir (x86)", 0, &type, (BYTE *)path, &size);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "CommonFilesFolder", path, 0); check_prop(hpkg, "CommonFilesFolder", path, 0, 0);
size = MAX_PATH; size = MAX_PATH;
RegQueryValueExA(pathkey, "CommonFilesDir", 0, &type, (BYTE *)path, &size); RegQueryValueExA(pathkey, "CommonFilesDir", 0, &type, (BYTE *)path, &size);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "CommonFiles64Folder", path, 0); check_prop(hpkg, "CommonFiles64Folder", path, 0, 0);
} }
else if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) else if (S(U(si)).wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL)
{ {
sprintf(buf, "%d", si.wProcessorLevel); sprintf(buf, "%d", si.wProcessorLevel);
check_prop(hpkg, "Intel", buf, 1); check_prop(hpkg, "Intel", buf, 1, 0);
GetSystemDirectoryA(path, MAX_PATH); GetSystemDirectoryA(path, MAX_PATH);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "SystemFolder", path, 0); check_prop(hpkg, "SystemFolder", path, 0, 0);
size = MAX_PATH; size = MAX_PATH;
RegQueryValueExA(pathkey, "ProgramFilesDir", 0, &type, (BYTE *)path, &size); RegQueryValueExA(pathkey, "ProgramFilesDir", 0, &type, (BYTE *)path, &size);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "ProgramFilesFolder", path, 0); check_prop(hpkg, "ProgramFilesFolder", path, 0, 0);
size = MAX_PATH; size = MAX_PATH;
RegQueryValueExA(pathkey, "CommonFilesDir", 0, &type, (BYTE *)path, &size); RegQueryValueExA(pathkey, "CommonFilesDir", 0, &type, (BYTE *)path, &size);
strcat(path, "\\"); strcat(path, "\\");
check_prop(hpkg, "CommonFilesFolder", path, 0); check_prop(hpkg, "CommonFilesFolder", path, 0, 0);
check_prop(hpkg, "MsiAMD64", "", 1); check_prop(hpkg, "MsiAMD64", "", 1, 0);
check_prop(hpkg, "Msix64", "", 1); check_prop(hpkg, "Msix64", "", 1, 0);
check_prop(hpkg, "VersionNT64", "", 1); check_prop(hpkg, "VersionNT64", "", 1, 0);
check_prop(hpkg, "System64Folder", "", 0); check_prop(hpkg, "System64Folder", "", 0, 0);
check_prop(hpkg, "ProgramFiles64Dir", "", 0); check_prop(hpkg, "ProgramFiles64Dir", "", 0, 0);
check_prop(hpkg, "CommonFiles64Dir", "", 0); check_prop(hpkg, "CommonFiles64Dir", "", 0, 0);
} }
CloseHandle(hkey1); CloseHandle(hkey1);
......
...@@ -473,7 +473,7 @@ void version_init(void) ...@@ -473,7 +473,7 @@ void version_init(void)
NtQuerySystemInformation( SystemWineVersionInformation, wine_version, sizeof(wine_version), NULL ); NtQuerySystemInformation( SystemWineVersionInformation, wine_version, sizeof(wine_version), NULL );
current_version = &VersionData[WIN7]; current_version = &VersionData[WIN10];
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root ); RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
attr.Length = sizeof(attr); attr.Length = sizeof(attr);
......
...@@ -2453,13 +2453,12 @@ HKLM,"System\CurrentControlSet\Services\Winsock\Parameters",,16 ...@@ -2453,13 +2453,12 @@ HKLM,"System\CurrentControlSet\Services\Winsock\Parameters",,16
HKLM,"System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog9\Catalog_Entries",,16 HKLM,"System\CurrentControlSet\Services\Winsock2\Parameters\Protocol_Catalog9\Catalog_Entries",,16
[VersionInfo] [VersionInfo]
HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1" HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.3"
HKLM,%CurrentVersionNT%,"CurrentMajorVersionNumber",0x10001,6 HKLM,%CurrentVersionNT%,"CurrentMajorVersionNumber",0x10001,10
HKLM,%CurrentVersionNT%,"CurrentMinorVersionNumber",0x10001,1 HKLM,%CurrentVersionNT%,"CurrentMinorVersionNumber",0x10001,0
HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1" HKLM,%CurrentVersionNT%,"CurrentBuild",2,"18362"
HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601" HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"18362"
HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601" HKLM,%CurrentVersionNT%,"CurrentType",2,"Multiprocessor Free"
HKLM,%CurrentVersionNT%,"CurrentType",2,"Uniprocessor Free"
HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
...@@ -2467,17 +2466,18 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ ...@@ -2467,17 +2466,18 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7" HKLM,%CurrentVersionNT%,"ProductName",2,"Windows 10 Pro"
HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT" HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT"
HKLM,%Control%\Windows,"CSDVersion",0x10003,0x100 HKLM,%Control%\Windows,"CSDVersion",0x10003,0
HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT" HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT"
[VersionInfo.ntamd64] [VersionInfo.ntamd64]
HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.1" HKLM,%CurrentVersionNT%,"CurrentVersion",2,"6.3"
HKLM,%CurrentVersionNT%,"CSDVersion",2,"Service Pack 1" HKLM,%CurrentVersionNT%,"CurrentMajorVersionNumber",0x10001,10
HKLM,%CurrentVersionNT%,"CurrentBuild",2,"7601" HKLM,%CurrentVersionNT%,"CurrentMinorVersionNumber",0x10001,0
HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"7601" HKLM,%CurrentVersionNT%,"CurrentBuild",2,"18362"
HKLM,%CurrentVersionNT%,"CurrentType",2,"Uniprocessor Free" HKLM,%CurrentVersionNT%,"CurrentBuildNumber",2,"18362"
HKLM,%CurrentVersionNT%,"CurrentType",2,"Multiprocessor Free"
HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
...@@ -2485,9 +2485,9 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\ ...@@ -2485,9 +2485,9 @@ HKLM,%CurrentVersionNT%,"DigitalProductId",1,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
HKLM,%CurrentVersionNT%,"ProductName",2,"Microsoft Windows 7" HKLM,%CurrentVersionNT%,"ProductName",2,"Windows 10 Pro"
HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT" HKLM,%Control%\ProductOptions,"ProductType",2,"WinNT"
HKLM,%Control%\Windows,"CSDVersion",0x10003,0x100 HKLM,%Control%\Windows,"CSDVersion",0x10003,0
HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT" HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT"
[Wow64] [Wow64]
......
...@@ -74,7 +74,7 @@ static const struct win_version win_versions[] = ...@@ -74,7 +74,7 @@ static const struct win_version win_versions[] =
#endif #endif
}; };
#define DEFAULT_WIN_VERSION L"win7" #define DEFAULT_WIN_VERSION L"win10"
static const WCHAR szKey9x[] = L"Software\\Microsoft\\Windows\\CurrentVersion"; static const WCHAR szKey9x[] = L"Software\\Microsoft\\Windows\\CurrentVersion";
static const WCHAR szKeyNT[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion"; static const WCHAR szKeyNT[] = L"Software\\Microsoft\\Windows NT\\CurrentVersion";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment