Skip to content

Instantly share code, notes, and snippets.

@hsmalley
Last active August 29, 2015 14:00
Show Gist options
  • Save hsmalley/121ff0eeff52280f15fa to your computer and use it in GitHub Desktop.
Save hsmalley/121ff0eeff52280f15fa to your computer and use it in GitHub Desktop.
Detects and Removes Dropbox
@ECHO OFF
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: SETUP DATE FOR LOGGING ERRORS
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:SETUPDATE
FOR /F "TOKENS=2,3,4 DELIMS=-/.: " %%F IN ("%DATE%") DO SET FORMATTED_DATE=%%F-%%G-%%H
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Dropbox Detection & Removal
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:DROPBOX
IF EXIST %USERPROFILE%\APPDATA\ROAMING\DROPBOX\BIN\DROPBOX.EXE (
ECHO USER %USERNAME% ON %COMPUTERNAME% - DROPBOX DETECTED - %FORMATTED_DATE% >> \\SERVER\LOGS$\DROPBOX.TXT
%USERPROFILE%\APPDATA\ROAMING\DROPBOX\BIN\DROPBOXUNINSTALLER.EXE /S
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment