diff --git a/base/setup/lib/install.c b/base/setup/lib/install.c index f2875d0716e..a9a489bf8ce 100644 --- a/base/setup/lib/install.c +++ b/base/setup/lib/install.c @@ -783,7 +783,7 @@ PrepareFileCopy( InfHandle = SpInfOpenInfFile(PathBuffer, NULL, - INF_STYLE_OLDNT, // INF_STYLE_WIN4, + INF_STYLE_WIN4, pSetupData->LanguageId, &ErrorLine); } diff --git a/base/setup/lib/setuplib.c b/base/setup/lib/setuplib.c index 9a7ea88a9aa..c63c5dfb87a 100644 --- a/base/setup/lib/setuplib.c +++ b/base/setup/lib/setuplib.c @@ -516,7 +516,7 @@ LoadSetupInf( pSetupData->SetupInf = SpInfOpenInfFile(FileNameBuffer, NULL, - /* INF_STYLE_WIN4 | */ INF_STYLE_OLDNT, + INF_STYLE_WIN4, pSetupData->LanguageId, &ErrorLine); if (pSetupData->SetupInf == INVALID_HANDLE_VALUE) @@ -531,7 +531,8 @@ LoadSetupInf( return ERROR_CORRUPT_TXTSETUPSIF; /* Check 'Signature' string */ - if (_wcsicmp(Value, L"$ReactOS$") != 0) + if (_wcsicmp(Value, L"$ReactOS$") != 0 && + _wcsicmp(Value, L"$Windows NT$") != 0) { INF_FreeData(Value); return ERROR_SIGNATURE_TXTSETUPSIF; diff --git a/base/setup/reactos/spapisup/infsupp.c b/base/setup/reactos/spapisup/infsupp.c index c95aad8e6ed..7c40e8421e3 100644 --- a/base/setup/reactos/spapisup/infsupp.c +++ b/base/setup/reactos/spapisup/infsupp.c @@ -10,6 +10,7 @@ /* INCLUDES ******************************************************************/ #include "reactos.h" +#include #define NDEBUG #include @@ -38,10 +39,10 @@ SetupOpenInfFileExW( IN LCID LocaleId, OUT PUINT ErrorLine) { + HINF InfHandle; + LCID OldLocaleId; WCHAR Win32FileName[MAX_PATH]; - UNREFERENCED_PARAMETER(LocaleId); - /* * SetupOpenInfFileExW is called within setuplib with NT paths, however * the Win32 SetupOpenInfFileW API only takes Win32 paths. We therefore @@ -54,10 +55,28 @@ SetupOpenInfFileExW( return INVALID_HANDLE_VALUE; } - return SetupOpenInfFileW(Win32FileName, - InfClass, - InfStyle, - ErrorLine); + /* + * Because SetupAPI's SetupOpenInfFileW() function does not allow the user + * to specify a given LCID to use to load localized string substitutions, + * we temporarily change the current thread locale before calling + * SetupOpenInfFileW(). When we have finished we restore the original + * thread locale. + */ + OldLocaleId = GetThreadLocale(); + if (OldLocaleId != LocaleId) + SetThreadLocale(LocaleId); + + /* Load the INF file */ + InfHandle = SetupOpenInfFileW(Win32FileName, + InfClass, + InfStyle, + ErrorLine); + + /* Restore the original thread locale */ + if (OldLocaleId != LocaleId) + SetThreadLocale(OldLocaleId); + + return InfHandle; } diff --git a/boot/bootdata/caroots.inf b/boot/bootdata/caroots.inf index a7d09f9477e..4c30bc97513 100644 --- a/boot/bootdata/caroots.inf +++ b/boot/bootdata/caroots.inf @@ -5,7 +5,7 @@ ; Data licensed under MPL 2.0 [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" [AddReg] ; "SSL.com EV Root Certification Authority ECC" (664 bytes) diff --git a/boot/bootdata/hivebcd.inf b/boot/bootdata/hivebcd.inf index a7d904a3c63..0782558eb04 100644 --- a/boot/bootdata/hivebcd.inf +++ b/boot/bootdata/hivebcd.inf @@ -1,5 +1,5 @@ [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" [AddReg] BCD,"BCD00000000\Description\Control","System",0x00010001,1 diff --git a/boot/bootdata/hivecls.inf b/boot/bootdata/hivecls.inf index 4a953a1f86b..446da702532 100644 --- a/boot/bootdata/hivecls.inf +++ b/boot/bootdata/hivecls.inf @@ -1,5 +1,5 @@ [Version] -Signature="$ReactOS$" +Signature = "$Windows NT$" [AddReg] HKLM,"SOFTWARE\Classes",,0x00000010 diff --git a/boot/bootdata/hivedef.inf b/boot/bootdata/hivedef.inf index 618635a7d7d..91ce76e3282 100644 --- a/boot/bootdata/hivedef.inf +++ b/boot/bootdata/hivedef.inf @@ -1,5 +1,5 @@ [Version] -Signature="$ReactOS$" +Signature = "$Windows NT$" [AddReg] diff --git a/boot/bootdata/hiveinst.inf b/boot/bootdata/hiveinst.inf index d815185b3af..e4066a74011 100644 --- a/boot/bootdata/hiveinst.inf +++ b/boot/bootdata/hiveinst.inf @@ -1,5 +1,5 @@ [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" [AddReg] ; Enable _one_ driver per section by removing the leading semicolon. diff --git a/boot/bootdata/hivesft.inf b/boot/bootdata/hivesft.inf index e96e5de938a..6ccd294c22b 100644 --- a/boot/bootdata/hivesft.inf +++ b/boot/bootdata/hivesft.inf @@ -1,5 +1,5 @@ [Version] -Signature="$ReactOS$" +Signature = "$Windows NT$" [AddReg] diff --git a/boot/bootdata/hivesys.inf b/boot/bootdata/hivesys.inf index 76491a5d2e1..41da57681e8 100644 --- a/boot/bootdata/hivesys.inf +++ b/boot/bootdata/hivesys.inf @@ -1,5 +1,5 @@ [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" [AddReg] diff --git a/boot/bootdata/livecd.inf b/boot/bootdata/livecd.inf index f826a7f6c41..fda2356a978 100644 --- a/boot/bootdata/livecd.inf +++ b/boot/bootdata/livecd.inf @@ -1,5 +1,5 @@ [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" [DelReg] diff --git a/boot/bootdata/packages/reactos.dff.in b/boot/bootdata/packages/reactos.dff.in index f122a8f5284..94248402385 100644 --- a/boot/bootdata/packages/reactos.dff.in +++ b/boot/bootdata/packages/reactos.dff.in @@ -11,7 +11,8 @@ .InfBegin [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" +;Signature = "$ReactOS$" ; Directories relative to the installation directory. ; For specifying absolute directories, use the SystemPartitionFiles section, diff --git a/boot/bootdata/setupreg.inf b/boot/bootdata/setupreg.inf index 7dbf932b567..197918f13b1 100644 --- a/boot/bootdata/setupreg.inf +++ b/boot/bootdata/setupreg.inf @@ -1,5 +1,5 @@ [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" [DelReg] diff --git a/boot/bootdata/txtsetup.sif b/boot/bootdata/txtsetup.sif index 808c2e2bc70..03609d2fcf3 100644 --- a/boot/bootdata/txtsetup.sif +++ b/boot/bootdata/txtsetup.sif @@ -1,5 +1,6 @@ [Version] -Signature = "$ReactOS$" +Signature = "$Windows NT$" +;Signature = "$ReactOS$" ; ; The [SourceDisksNames] section lists all the available installation media