diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 26c576e4f0f..df2d0d6d204 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -1125,28 +1125,16 @@ done: /*********************************************************************** * init_windows_dirs - * - * Create the windows and system directories if necessary. */ static void init_windows_dirs(void) { static const WCHAR default_syswow64W[] = {'C',':','\\','w','i','n','d','o','w','s', '\\','s','y','s','w','o','w','6','4',0}; - if (!CreateDirectoryW( DIR_Windows, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) - ERR( "directory %s could not be created, error %u\n", - debugstr_w(DIR_Windows), GetLastError() ); - if (!CreateDirectoryW( DIR_System, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) - ERR( "directory %s could not be created, error %u\n", - debugstr_w(DIR_System), GetLastError() ); - if (is_win64 || is_wow64) /* SysWow64 is always defined on 64-bit */ { DIR_SysWow64 = default_syswow64W; memcpy( winevdm, default_syswow64W, sizeof(default_syswow64W) - sizeof(WCHAR) ); - if (!CreateDirectoryW( DIR_SysWow64, NULL ) && GetLastError() != ERROR_ALREADY_EXISTS) - ERR( "directory %s could not be created, error %u\n", - debugstr_w(DIR_SysWow64), GetLastError() ); } } diff --git a/server/registry.c b/server/registry.c index 9e6815d8e3a..dffa3acffd5 100644 --- a/server/registry.c +++ b/server/registry.c @@ -1866,6 +1866,14 @@ void init_registry(void) /* start the periodic save timer */ set_periodic_save_timer(); + /* create windows directories */ + + if (!mkdir( "drive_c/windows", 0777 )) + { + mkdir( "drive_c/windows/system32", 0777 ); + if (prefix_type == PREFIX_64BIT) mkdir( "drive_c/windows/syswow64", 0777 ); + } + /* go back to the server dir */ if (fchdir( server_dir_fd ) == -1) fatal_error( "chdir to server dir: %s\n", strerror( errno )); }