Skip to content

Instantly share code, notes, and snippets.

@fredeerock
Last active March 14, 2025 15:11
Show Gist options
  • Save fredeerock/c839e97a7d4bf9770d6237947d01c40f to your computer and use it in GitHub Desktop.
Save fredeerock/c839e97a7d4bf9770d6237947d01c40f to your computer and use it in GitHub Desktop.
Mounting a Box.com drive on Windows that also automatically runs at logon.

Mounting a Box.com Drive on Windows

  1. Install rclone by opening Terminal and typing winget install Rclone.Rclone
  2. Install WinFSP: winget install WinFsp.WinFsp
  3. In Terminal, run rclone config create myBox box
  4. A browser window should pop up. Login to box.com there.
  5. To mount the Box drive, type into terminal: rclone mount myBox: B: --vfs-cache-mode full --vfs-cache-max-size 100G --vfs-cache-max-age 24h --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G --buffer-size 256M
  6. Create VB Script: @('Set objShell = CreateObject("WScript.Shell")', 'objShell.Run """C:\Users\dostr\AppData\Local\Microsoft\WinGet\Links\rclone.exe"" mount myBox: B: --vfs-cache-mode full --vfs-cache-max-size 100G --vfs-cache-max-age 24h --vfs-read-chunk-size 128M --vfs-read-chunk-size-limit 1G --buffer-size 256M --log-file C:\rclone\logs\rclone.log --log-level DEBUG", 0, False') | Out-File -Encoding ASCII C:\rclone\rclone-mount.vbs
  7. Create a task to automatically run rclone at Windows startup: Register-ScheduledTask -TaskName "RcloneMount" -Action (New-ScheduledTaskAction -Execute "wscript.exe" -Argument "C:\rclone\rclone-mount.vbs") -Trigger (New-ScheduledTaskTrigger -AtLogOn) -Principal (New-ScheduledTaskPrincipal -UserId $env:USERNAME -LogonType Interactive) -Settings (New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable -MultipleInstances IgnoreNew -ExecutionTimeLimit 0) -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment