Note: End of Life (EOL) has been announced for Box Sync effective
December 2026. For more information visit the
official announcement page.
Disclaimer: Please note that the configurations identified in this document are not officially supported by Box and any configuration changes performed by users or organizations are at your own risk. As these configurations reference changes made to individual machines, Box User Services is not able to provide support and assistance in trouble shooting any issues encountered.
Method 1: Utilizing Microsoft APIs
Method 2: Utilizing Changes to End Users’ Registries
Note: Both of these options require that an end user has successfully logged in to Box Sync and that a Box Sync folder has been successfully created on their machine. It is not possible to provide redirection of the Box Sync folder before it has been created through a successful authentication.
Microsoft APIs
Use of Microsoft APIs allows for a more streamlined solution and does not require end users to restart their machines for the changes to take effect. The information referenced within this section can be written in any language that can access COM APIs (e.g., C, C++, C#, Python, Perl). Refer to the following link for Microsoft’s information on the Windows Shell: https://msdn.microsoft.com/en-us/library/windows/desktop/ff521731(v=vs.85).aspx The following flags are recommended for use:| Flag | Description |
| KF_REDIRECT_COPY_CONTENTS | This copies the existing contents (both the files and subfolders) of the known folder to the redirected folder location. |
| KF_REDIRECT_DEL_SOURCE_CONTENTS | This deletes the contents of the source folder after they have been copied to the redirected folder. |
| KF_REDIRECT_UNPIN | This unpins the source folder. |
| KF_REDIRECT_PIN | This pins the target folder. |
Example Code (written in C)
// Create the KnownFolderManager object
IKnownFolderManager *folderManager = 0;CoCreateInstance(CLSID_KnownFolderManager, NULL, CLSCTX_ALL,IID_IKnownFolderManager, (void **)&folderManager);
// Perform the redirectionLPWSTR error;folderManager->Redirect(FOLDERID_Documents, NULL,KF_REDIRECT_COPY_CONTENTS |KF_REDIRECT_DEL_SOURCE_CONTENTS |KF_REDIRECT_UNPIN | KF_REDIRECT_PIN,boxSyncDocumentsPath, 0, NULL, &error);
Registry Changes
Use of registry changes is a secondary approach that can be used by administrators to redirect the user’s Desktop. Documents, Favorites, Pictures, Music, Video, etc. folders to point to folders inside the Box Sync folder. Please note that this option requires a restart to the users’ machines before the change takes effect, and that any movement of files may cause document paths to change. As a result, users may experience unintended impacts (e.g., accessing an old file through “Recent Files” may fail). With this redirection in place, applications will, by default, offer to save files in these folders, and saved documents will automatically be uploaded to Box. Configuration changes should be made by going to the registry at:- HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
- Box Sync\FileSync\Desktop
- Box Sync\FileSync\Documents
- Box Sync\FileSync\Favorites
- Box Sync\FileSync\Pictures
- Box Sync\FileSync\Music
- Box Sync\FileSync\Video
| Registry Value (Example) | Old Value (Example) | New Value (Example) |
| Desktop | %USERPROFILE%\Desktop | %USERPROFILE%\Box Sync\FileSync\Desktop |
| Personal | %USERPROFILE%\Documents | %USERPROFILE%\Box Sync\FileSync\Documents |
| Favorites | %USERPROFILE%\Favorites | %USERPROFILE%\Box Sync\FileSync\Favorites |
| Pictures | %USERPROFILE%\Pictures | %USERPROFILE%\Box Sync\FileSync\Pictures |
| Music | %USERPROFILE%\Music | %USERPROFILE%\Box Sync\FileSync\Music |
| Video | %USERPROFILE%\Video | %USERPROFILE%\Box Sync\FileSync\Video |
Note: On Windows 10, it is a known issue that the ‘Quick Access’ links do not work in this configuration.
Example Code
The following is an example of a script that can be used as a starting place for your customized script: https://gist.github.com/anonymous/53b81a190d0e24e93cbb00dd48ab5cc7Disclaimer The configurations identified in this document are not officially supported by Box and any configuration changes performed by users or organizations are at your own risk. As these configurations reference changes made to individual machines, Box User Services is not able to provide support and assistance in trouble shooting any issues encountered.