85 L"Default User",
L"DefaultUserProfile",
86 L"USERPROFILE",
L"%USERPROFILE%",
89 L".Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
90 L".Default\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
93 L"All Users",
L"AllUsersProfile",
94 L"ALLUSERSPROFILE",
L"%ALLUSERSPROFILE%",
97 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
98 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders"
120 StringCbCopyW(szBuffer,
sizeof(szBuffer), pProfileParams->pszProfileName);
123 StringCbCopyW(szProfilePath,
sizeof(szProfilePath), pszProfilesPath);
125 StringCbCatW(szProfilePath,
sizeof(szProfilePath), szBuffer);
145 StringCbCopyW(szProfilePath,
sizeof(szProfilePath), pszProfilesPath);
147 StringCbCatW(szProfilePath,
sizeof(szProfilePath), szBuffer);
164 pProfileParams->pszProfileRegValue,
187 lpFolderData = pProfileParams->pFolderList;
222 pProfileParams->pszShellFoldersKey,
236 lpFolderData = pProfileParams->pFolderList;
278 pProfileParams->pszUserShellFoldersKey,
289 lpFolderData = pProfileParams->pFolderList;
294 StringCbCopyW(szBuffer,
sizeof(szBuffer), pProfileParams->pszEnvVarProfilePath);
343 DPRINT(
"InitializeProfiles()\n");
356 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList",
392 L"ProfilesDirectory",
443 DPRINT(
"UpdateUsersShellFolderSettings() called\n");
445 DPRINT(
"User profile path: %S\n", lpUserProfilePath);
448 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
464 StringCbCopyW(szBuffer,
sizeof(szBuffer), lpUserProfilePath);
501 DPRINT(
"UpdateUsersShellFolderSettings() done\n");
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
static DWORD DWORD * dwLength
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW(IN LPCWSTR lpName, IN LPCWSTR lpValue)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL AppendSystemPostfix(LPWSTR lpName, DWORD dwMaxLength)
#define IDS_LOCALSETTINGS
static PROFILEPARAMS StandardProfiles[]
struct _FOLDERDATA FOLDERDATA
struct _FOLDERDATA * PFOLDERDATA
static BOOL CreateStandardProfile(IN LPCWSTR pszProfilesPath, IN HKEY hProfileListKey, IN PPROFILEPARAMS pProfileParams)
struct _PROFILEPARAMS PROFILEPARAMS
BOOL WINAPI InitializeProfiles(VOID)
static FOLDERDATA UserShellFolders[]
BOOL UpdateUsersShellFolderSettings(LPCWSTR lpUserProfilePath, HKEY hUserKey)
static FOLDERDATA CommonShellFolders[]
struct _PROFILEPARAMS * PPROFILEPARAMS
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_ALREADY_EXISTS
#define FILE_ATTRIBUTE_HIDDEN
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
LPCWSTR pszEnvVarProfilePath
LPCWSTR pszProfileRegValue
LPCWSTR pszShellFoldersKey
LPCWSTR pszUserShellFoldersKey
DWORD WINAPI GetLastError(void)
#define HKEY_LOCAL_MACHINE
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)