DropBox Freezes Out Explorer
05 Aug 2009I’ve been using DropBox for some time now and I use it in some ways that I think are quite innovative and will be the subject of future blog posts. However in the last few days I’ve been having a few problems with Windows Explorer taking forever (well over a minute or two at times) to respond and it responds very sluggishly. I’ve managed to track the problem down to DropBox misbehaving.
I’m running version 0.6.507.0 as I have been for some time, but something somewhere has started causing these little fits. The solution is simple. Bring up task manager, find the dropbox.exe process and kill it. Then navigate to the start up programs on the Windows start menu and start Dropbox.
Actually whilst that’s simple it all seemed a bit too much of a hassle for lazy me so I wrote a little script to do it.
Option Explicit
Const DROPBOX_FOLDER = "C:\Program Files\Dropbox\"
Const DROPBOX_EXE = "Dropbox.exe"
KillProcess(DROPBOX_EXE)
StartApplication(DROPBOX_FOLDER & DROPBOX_EXE)
Sub KillProcess(p_strProcess)
Dim objService, objProcess
Dim colProcesses
Dim strProcessKill
Set objService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colProcesses = objService.ExecQuery("Select * from Win32_Process Where Name = '" & p_strProcess & "'")
For Each objProcess in colProcesses
objProcess.Terminate()
Next
End Sub
Sub StartApplication(p_strAppPath)
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run("""" & p_strAppPath & """")
End Sub
Pop a shortcut to the script on your desktop and you should be able to access it quick enough - or even quicker if you set a shortcut key combination on it.
The script uses a couple of fairly standard little routines. One kills the process and the other starts the application. If you happen to have DropBox installed in an unusual location (mine is in the default), then just amend the first constant.
NB: You’ll probably notice that after the script
runs you’ll have two DropBox icons in your system tray. If you move
your mouse pointer over the two icons the one for the now terminated
process will disappear.