uses SHFolder; const _BUFSZ = 516; var buf: array[0.. _BUFSZ-1] of Char; begin FillChar(buf[0], _BUFSZ, 0); SHGetFolderPath(0, CSIDL_LOCAL_APPDATA, 0, 0, @buf[0]); g_sLocalAppData := buf; FillChar(buf[0], _BUFSZ, 0); SHGetFolderPath(0, CSIDL_COMMON_APPDATA, 0, 0, @buf[0]); g_sAllUserAppData := buf; sUserCfg := g_sLocalAppData+'\Microsoft\'; end;