How to set a custom PreVeil Cloud Drive location on Windows 11
Note: These steps require admin privileges for certain actions. Users may login as an admin or answer the User Account Control prompts.
By default, the local Cloud Drive directory is in the user's home folder on your local file system. If you want to move this directory elsewhere on your local file system, this article explains how.
To move the local Cloud Drive directory location:
Set the environment variable PREVEIL_CLOUD_DRIVE_SYNC_ROOT_DIR to the path to use as the custom drive location.
In the Windows search bar, type in the search term environmental variable.
Select the Edit system environmental variables option from the list of results.
Click on the Environmental Variables button.
Click the New button under the User Variables for User section.
In the Variable name field, enter PREVEIL_CLOUD_DRIVE_SYNC_ROOT_DIR
In the Variable value field, enter the location of where you want to move the local sync directory to.
Download and run the attached script below to reset a user's sync root in a non-elevated PowerShell window for the user that you want to have a custom drive location set, e.g.,
.\reset-user-syncroot.ps1 -UserId ivalencia+a1@preveil.com
Open a non-elevated PowerShell window on the computer and call upon the script in the location it was saved to on the device.
Reboot the computer for the change to take effect.
Note: You may need to set your PowerShell execution policy to run the attached script. If the script fails due to policy restrictions, run this command in PowerShell to allow the script during the active session: Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
This change is temporary. The execution policy reverts to default when you close PowerShell.
Questions
Will this persist across system reboots?
Yes
Will all my files get pinned in the new location?
By default, data remains unpinned after moving to the new location but can be pinned manually using these options:
Right-click an item and select Always keep on this device to pin data permanently to the local directory.
Double-click a file to open it. This temporarily pins the file locally but reverts to cloud-only access after 24 hours.
What happens to my former Drive location?
After moving your Drive, it remains in both the new and original locations. Once you confirm the data is fully present in the new location, you can delete the original local directory at C:\Users\[the user’s Windows profile folder] .