Many registry keys under XP refer to a %ResourceDir% env that points to the path where windows themes are located. In case any apps refer to this, or if someone loads a registry export from XP this should be available in wine also Interestingly, windows doesn't actually have this env set..my guess is ExpandEnvironmentStrings has a special case to handle this particular name if this isn't acceptable I'll implement it through that route..but this seems cleaner Index: documentation/samples/config =================================================================== RCS file: /home/wine/wine/documentation/samples/config,v retrieving revision 1.53 diff -u -r1.53 config --- documentation/samples/config 5 Dec 2003 00:11:48 -0000 1.53 +++ documentation/samples/config 6 Dec 2003 04:24:18 -0000 @@ -68,6 +68,7 @@ "Temp" = "e:\\" "Path" = "c:\\windows;c:\\windows\\system;e:\\;e:\\test;f:\\" "Profile" = "c:\\windows\\Profiles\\Administrator" +"Resources" = "c:\\windows\\Resources" "GraphicsDriver" = "x11drv" ;"ShowDirSymlinks" = "1" ;"ShowDotFiles" = "1" Index: files/directory.c =================================================================== RCS file: /home/wine/wine/files/directory.c,v retrieving revision 1.70 diff -u -r1.70 directory.c --- files/directory.c 15 Nov 2003 00:13:21 -0000 1.70 +++ files/directory.c 6 Dec 2003 04:24:18 -0000 @@ -111,7 +111,7 @@ HKEY hkey; char path[MAX_PATHNAME_LEN]; WCHAR longpath[MAX_PATHNAME_LEN]; - DOS_FULL_NAME tmp_dir, profile_dir; + DOS_FULL_NAME tmp_dir, profile_dir, resources_dir; int drive; const char *cwd; static const WCHAR wineW[] = {'M','a','c','h','i','n','e','\\', @@ -134,6 +134,9 @@ static const WCHAR winsysdirW[] = {'w','i','n','s','y','s','d','i','r',0}; static const WCHAR userprofileW[] = {'U','S','E','R','P','R','O','F','I','L','E',0}; static const WCHAR systemrootW[] = {'S','Y','S','T','E','M','R','O','O','T',0}; + static const WCHAR resourcesW[] = {'r','e','s','o','u','r','c','e','s',0}; + static const WCHAR resources_dirW[] = {'c',':','\\','w','i','n','d','o','w','s','\\','r','e','s','o','u','r','c','e','s',0}; + static const WCHAR resourcedirW[] = {'R','E','S','O','U','R','C','E','D','I','R',0}; static const WCHAR wcmdW[] = {'\\','w','c','m','d','.','e','x','e',0}; static const WCHAR comspecW[] = {'C','O','M','S','P','E','C',0}; static const WCHAR empty_strW[] = { 0 }; @@ -248,6 +251,12 @@ { TRACE("USERPROFILE= %s\n", debugstr_w(longpath) ); SetEnvironmentVariableW( userprofileW, longpath ); + } + + if (DIR_GetPath( hkey, resourcesW, resources_dirW, &resources_dir, longpath, MAX_PATHNAME_LEN, FALSE )) + { + TRACE("RESOURCEDIR= %s\n", debugstr_w(longpath) ); + SetEnvironmentVariableW( resourcedirW, longpath ); } TRACE("SYSTEMROOT = %s\n", debugstr_w(DIR_Windows.short_name) );