Changeset 10169 for trunk/tools/install/odininst.cpp
- Timestamp:
- Jul 16, 2003, 12:51:10 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/install/odininst.cpp
r9645 r10169 1 /* $Id: odininst.cpp,v 1.1 3 2003-01-07 20:01:47sandervl Exp $ */1 /* $Id: odininst.cpp,v 1.14 2003-07-16 10:51:10 sandervl Exp $ */ 2 2 /* 3 3 * Odin WarpIn installation app … … 34 34 */ 35 35 #include <os2win.h> 36 #include <io.h> 36 37 #include <string.h> 37 38 #include <stdio.h> … … 592 593 goto initreg_error; 593 594 } 594 //Create x:\Program Files directory 595 strcpy(shellpath, InternalGetWindowsDirectory()); 596 shellpath[2] = 0; //get drive 597 strcat(shellpath, "\\Program Files"); 598 CreateDirectory(shellpath, NULL); 599 RegSetValueEx(hkey, DIR_PROGRAM, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 600 601 //Create x:\Program Files\Common Files directory 602 strcat(shellpath, "\\Common Files"); 603 CreateDirectory(shellpath, NULL); 604 RegSetValueEx(hkey, DIR_PROGRAM_COMMON, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 595 //Check if DIR_PROGRAM already created 596 val = sizeof(shellpath); 597 if (RegQueryValueEx(hkey, DIR_PROGRAM, 0, NULL, (LPBYTE)shellpath, &val) != ERROR_SUCCESS 598 || GetFileAttributes( shellpath) == -1) { 599 //Create x:\Program Files directory 600 strcpy(shellpath, InternalGetWindowsDirectory()); 601 shellpath[2] = 0; //get drive 602 strcat(shellpath, "\\Program Files"); 603 CreateDirectory(shellpath, NULL); 604 RegSetValueEx(hkey, DIR_PROGRAM, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 605 606 //Create x:\Program Files\Common Files directory 607 strcat(shellpath, "\\Common Files"); 608 CreateDirectory(shellpath, NULL); 609 RegSetValueEx(hkey, DIR_PROGRAM_COMMON, 0,REG_SZ, (LPBYTE)shellpath, strlen(shellpath)+1); 610 } 605 611 606 612 strcpy(shellpath, InternalGetWindowsDirectory());
Note:
See TracChangeset
for help on using the changeset viewer.