Author: ekohl
Date: Tue Jun 15 19:31:19 2010
New Revision: 47784
URL:
http://svn.reactos.org/svn/reactos?rev=47784&view=rev
Log:
[SYSSETUP]
Set registry values 'PathName' and 'SystemRoot' in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion.
This fixes bug #4414.
Modified:
trunk/reactos/dll/win32/syssetup/install.c
Modified: trunk/reactos/dll/win32/syssetup/install.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/install…
==============================================================================
--- trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/syssetup/install.c [iso-8859-1] Tue Jun 15 19:31:19 2010
@@ -855,6 +855,7 @@
DWORD LastError;
HANDLE token;
TOKEN_PRIVILEGES privs;
+ HKEY hKey;
InitializeSetupActionLog(FALSE);
LogItem(SYSSETUP_SEVERITY_INFORMATION, L"Installing ReactOS");
@@ -901,6 +902,29 @@
if (GetWindowsDirectory(szBuffer, sizeof(szBuffer) / sizeof(TCHAR)))
{
+ if (RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+ L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",
+ 0,
+ KEY_WRITE,
+ &hKey) == ERROR_SUCCESS)
+ {
+ RegSetValueExW(hKey,
+ L"PathName",
+ 0,
+ REG_SZ,
+ (LPBYTE)szBuffer,
+ (wcslen(szBuffer) + 1) * sizeof(WCHAR));
+
+ RegSetValueExW(hKey,
+ L"SystemRoot",
+ 0,
+ REG_SZ,
+ (LPBYTE)szBuffer,
+ (wcslen(szBuffer) + 1) * sizeof(WCHAR));
+
+ RegCloseKey(hKey);
+ }
+
PathAddBackslash(szBuffer);
_tcscat(szBuffer, _T("system"));
CreateDirectory(szBuffer, NULL);