From 41132171552461f844d78b331b16bb0c69bf04f4 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 5 May 2004 22:01:10 +0000 Subject: [PATCH] Added support for DIRID_USERPROFILE. --- dlls/setupapi/dirid.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/setupapi/dirid.c b/dlls/setupapi/dirid.c index 63f2e86377b..751778a1fe5 100644 --- a/dlls/setupapi/dirid.c +++ b/dlls/setupapi/dirid.c @@ -76,8 +76,10 @@ static const WCHAR *create_system_dirid( int dirid ) static const WCHAR Viewers[] = {'\\','v','i','e','w','e','r','s',0}; static const WCHAR System[] = {'\\','s','y','s','t','e','m',0}; static const WCHAR Spool[] = {'\\','s','p','o','o','l',0}; + static const WCHAR Profile[] = {'\\','p','r','o','f','i','l','e','s','\\','A','d','m','i','n','i','s','t','r','a','t','o','r',0}; + static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0}; - WCHAR buffer[MAX_PATH+16], *str; + WCHAR buffer[MAX_PATH+32], *str; int len; switch(dirid) @@ -126,9 +128,13 @@ static const WCHAR *create_system_dirid( int dirid ) GetWindowsDirectoryW( buffer, MAX_PATH ); strcatW( buffer, Spool ); break; + case DIRID_USERPROFILE: + if (GetEnvironmentVariableW( UserProfile, buffer, MAX_PATH )) break; + GetWindowsDirectoryW( buffer, MAX_PATH ); + strcatW( buffer, Profile ); + break; case DIRID_LOADER: return C_Root; /* FIXME */ - case DIRID_USERPROFILE: /* FIXME */ case DIRID_COLOR: /* FIXME */ case DIRID_PRINTPROCESSOR: /* FIXME */ default: -- 2.11.4.GIT