Changeset 3913 for trunk/src/kernel32/initsystem.cpp
- Timestamp:
- Aug 2, 2000, 1:20:29 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/initsystem.cpp
r3740 r3913 1 /* $Id: initsystem.cpp,v 1.1 0 2000-06-21 20:51:51sandervl Exp $ */1 /* $Id: initsystem.cpp,v 1.11 2000-08-01 23:20:29 sandervl Exp $ */ 2 2 /* 3 3 * Odin system initialization (registry, directories & environment) … … 24 24 * - WINDOWSDIR\Start Menu\Programs\Startup 25 25 * - WINDOWSDIR\ShellNew 26 * - x:\Program Files 27 * - x:\Program Files\Common Files 26 28 * - and a minimal system registry 27 29 * 28 * NOTE: Most of this has to be moved into the Odin install program!!!!!30 * Copyright 1999-2000 Sander van Leeuwen (sandervl@xs4all.nl) 29 31 * 30 * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl) 31 * 32 * Project Odin Software License can be found in LICENSE.TXT 32 33 */ 33 34 … … 62 63 #define THREAD_BOTH "Both" 63 64 #define INITREG_ERROR "InitRegistry: Unable to register system information" 65 #define DIR_PROGRAM "ProgramFilesDir" 66 #define DIR_PROGRAM_COMMON "CommonFilesDir" 67 #define DIR_SHARED "SharedDir" 64 68 65 69 //****************************************************************************** … … 316 320 RegCloseKey(hkey1); 317 321 RegCloseKey(hkey); 322 323 //[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion] 324 //"ProgramFilesDir"="C:\Program Files" 325 //"CommonFilesDir"="C:\Program Files\Common Files" 326 //# This is intended for a centrally managed (server) directory where system files and e.g. fonts can reside. Most installs have this set to C:\WINDOWS, though. 327 //"SharedDir"="C:\WINDOWS" 328 if(RegCreateKeyA(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion",&hkey)!=ERROR_SUCCESS) { 329 goto initreg_error; 330 } 331 //Create x:\Program Files directory 332 strcpy(shellpath, InternalGetWindowsDirectoryA()); 333 shellpath[2] = 0; //get drive 334 strcat(shellpath, "\\Program Files"); 335 CreateDirectoryA(shellpath, NULL); 336 RegSetValueExA(hkey, DIR_PROGRAM, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 337 338 //Create x:\Program Files\Common Files directory 339 strcat(shellpath, "\\Common Files"); 340 CreateDirectoryA(shellpath, NULL); 341 RegSetValueExA(hkey, DIR_PROGRAM_COMMON, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 342 343 strcpy(shellpath, InternalGetWindowsDirectoryA()); 344 RegSetValueExA(hkey, DIR_SHARED, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 345 346 RegCloseKey(hkey); 347 318 348 return TRUE; 319 349
Note:
See TracChangeset
for help on using the changeset viewer.