Dropbox client all users install in SCCM

Dropbox is being integrated into office 365 and other tools.  But the Dropbox company has no concept beyond individual user deployment.  This script is to install Dropbox for all users using a administrator or system account on Windows 7 or Windows 8.

Yes there are changes that could be made to make this more specific (program files vs program files (x86)) or other customization... but the script is just a start.

Hopefully Dropbox will see it and they will address their client design for a all users deployment.

----- Powershell Script... Enjoy. -----
$dropboxexe = "Dropbox 2.10.52.exe"

$allusersprofile = (gci env:allusersprofile).value
$appdata = (gci env:appdata).value
$arguments=  '/S /D=C:\Program Files\Dropbox'

$LASTEXITCODE = (Start-Process -FilePath $dropboxexe -ArgumentList $arguments -Passthru).ExitCode

  $ExplorerRunning = Get-Process explorer -EA 0 
  if ($ExplorerRunning -eq $null)
    #if explorer stop restart it. 
    schtasks /Create /TN "DropBoxInstall" /TR explorer.exe /SC OnLogon /ru Users
schtasks /Run    /TN "DropBoxInstall"
schtasks /Delete /TN "DropBoxInstall" /F
  $dropboxexeRunning = Get-Process $($dropboxexe -replace ".exe") -EA 0 
  if ($dropboxexeRunning -eq $null)
    #if install is complete then stop dropbox.exe from starting
    kill -name dropbox -force
  Start-Sleep -m 500
} while ($i -lt 200)

#copy add remove programs entry
Remove-Item -path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox" -ea 0
copy-item -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox" -destination "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox"

#copy shortcuts
$PathFrom = "$($appdata)\Microsoft\Windows\Start Menu\Programs\Dropbox\*"
$PathTo   = "$($allusersprofile)\Microsoft\Windows\Start Menu\Programs\Dropbox\"
Remove-item -path $PathTo -recurse
md $PathTo -ea 0
copy-item -path $PathFrom -destination $PathTo -recurse


  • I spent a little time trying to use this but eventually decided I should repackage as it still wasn't completely silent (the script does attempt to kill Dropbox to prevent it starting, but this wasn't working for me).

    To help others however I identified the following: For the 1st line: $dropboxexe = "Dropbox 2.10.52.exe" I had to add a fully qualified path (e.g c:\temp\Dropbox_3.2.9.exe, but that might be down to the way I invoked it.

    copy-item -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox" -destination "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox" Requires a -Recurse switch to copy all the child items.
    It also Creates the Dropbox key twice i.e. Uninstall\Dropbox\Dropbox so the desination needs to end \Uninstall" (so it takes the Dropbox key and places it in Uninstall not in Uninstall\Dropbox).

    To avoid 2 entries for Dropbox appearing in Control Panel\Programs & Features we need:
    Remove-Item -path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dropbox" -ea 0

    I still had issues with the timing which I didn't get round to resolving, e.g. the script was trying to copy the shortcuts before they existed, so some further sleep required. - henryvii 8 years ago
    • Thank you for the response and feedback. In my software distribution package, I use relative path, so the I don't put the fully quaified path. Other software distribution systems, may need it. I think I fixed the -recurse registry copy issues when the package when to application owner testing. I don't have the issue with two entries in ARP, because I install as a "System" which has a different HKCU. I still have to resolve the timing issue (sleep)... some times it does not always copy the icons. - staples 8 years ago
  • Apologies about the readability, I'm not sure why all the line spacing has been removed from the above comment. - henryvii 8 years ago
  • Dropbox has finally released an enterprise installer that supports silent installs. Details at https://www.dropbox.com/help/9092. - GoFeisty 8 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ