Created
February 25, 2016 14:10
-
-
Save jpswade/201fd7f108920c64d4d7 to your computer and use it in GitHub Desktop.
Installs Mozilla Thunderbird
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
::install_thunderbird.bat - Installs Mozilla Thunderbird | |
@ECHO OFF | |
SETLOCAL EnableDelayedExpansion | |
:SETTINGS | |
SET INSTALLVER=17.0.11esr | |
SET INSTALLEXE=Thunderbird Setup %INSTALLVER%.exe | |
SET INSTALLURL=http://download.cdn.mozilla.net/pub/mozilla.org/thunderbird/releases/%INSTALLVER%/win32/en-GB/Thunderbird Setup %INSTALLVER%.exe | |
SET INSTALLDIR=%PROGRAMFILES%\Mozilla Thunderbird | |
SET INSTALLTBE=%INSTALLDIR%\thunderbird.exe | |
SET EXTENSIONS=%APPDATA%\Mozilla\Extensions\{3550f703-e582-4d05-9a08-453d09bdfdc6} | |
:ADMINCHECK | |
NET SESSION >nul 2>&1 | |
IF NOT ERRORLEVEL == 0 ( | |
ECHO ### ERROR: ADMINISTRATOR PRIVILEGES REQUIRED | |
ECHO See: http://support.microsoft.com/kb/305780 | |
ECHO. | |
ECHO Press any key to exit... | |
PAUSE>NUL | |
EXIT /B 1 | |
) | |
SET SOURCEDIR="%~dp0" | |
:ISINSTALLED | |
IF EXIST "%INSTALLTBE%" GOTO SKIPINSTALL | |
:DOWNLOAD | |
::ESR | |
::http://www.mozilla.org/en-US/thunderbird/organizations/index.html | |
::http://www.mozilla.org/en-US/thunderbird/organizations/all-esr.html | |
IF NOT EXIST "%SOURCEDIR%\%INSTALLEXE%" ( | |
ECHO Download %INSTALLEXE% to %SOURCEDIR% before continuing. | |
START /WAIT IEXPLORE "%INSTALLURL%" | |
PAUSE | |
) | |
:INSTALL | |
::http://sourceforge.net/apps/trac/unattended/wiki/MozillaThunderbird | |
::https://getsatisfaction.com/mozilla_messaging/topics/tb3_silent_installation | |
IF EXIST "%INSTALLTBE%" GOTO EXTENTIONS | |
ECHO Installing Thunderbird... | |
IF NOT EXIST "%SOURCEDIR%\%INSTALLEXE%" GOTO DOWNLOAD | |
"%SOURCEDIR%\%INSTALLEXE%" -ms -ira | |
:SKIPINSTALL | |
:INSTALLCHECK | |
IF NOT EXIST "%INSTALLTBE%" ( | |
ECHO Unable to find install, try again? | |
PAUSE | |
GOTO INSTALL | |
) | |
:EXTENTIONS | |
::http://kb.mozillazine.org/Installing_extensions | |
::https://developer.mozilla.org/en-US/docs/Installing_extensions | |
::http://kb.mozillazine.org/Install.rdf | |
IF NOT EXIST "%EXTENSIONS%" MKDIR "%EXTENSIONS%" | |
::FOREACH EXTENTION... | |
FOR /F %%F in ('DIR /B %SOURCEDIR%\*.xpi') DO ( | |
IF NOT EXIST "%EXTENSIONS%\%%F" ( | |
ECHO Installing %%F... | |
COPY /Y "%SOURCEDIR%\%%F" "%EXTENSIONS%\%%F" | |
) | |
) | |
:DONE | |
ECHO Done! | |
:EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment