@echo off rem Firefox install script (c) 2004 Markus Gaugusch rem http://gaugusch.at/firefox.shtml rem rem Firefox install script - http://gaugusch.at/firefox.shtml rem ------------------------------------------------------------ rem Enter your firefox installation directory here rem ------------------------------------------------------------ cls set instsource=\\fileserver\public\software\firefox-0.9\firefox rem If you want to create the start menu/desktop entries, you rem have to create a shortcut named "Firefox.lnk". It is rem expected to be inside the Firefox directory (where rem firefox.exe is located). rem Let it point to "%dest%\Firefox.exe" (with the quotes!) rem rem ------------------------------------------------------------ rem No changes needed below (hopefully ;-) rem ------------------------------------------------------------ if not exist "%PROGRAMFILES%" goto noNT4install goto startinstall :noNT4install rem NT4 does not have %APPDATA% and %PROGRAMFILES% :-( echo -------------------------------------------------------------------------- echo ERROR! echo. echo Installation on NT4 is not supported. echo -------------------------------------------------------------------------- goto done :startinstall if exist "%ProgramFiles%\Mozilla Firefox" goto alreadyinstalled set dest=%ProgramFiles%\Firefox echo. echo Installing Firefox ... echo. :profileok if exist "%dest%" goto exists :copy mkdir "%dest%" echo Copying Firefox to %dest% ... xcopy /s /q "%instsource%" "%dest%" echo Creating shortcuts ... xcopy /q "%dest%\Firefox.lnk" "%Userprofile%\Desktop" xcopy /q "%dest%\Firefox.lnk" "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\" pushd "%USERPROFILE%" cd Start* cd Progra* xcopy "%dest%\Firefox.lnk" . /q popd rem if exist "%APPDATA%\Mozilla\Firefox" goto extensions rem Create/Migrate Profile for 0.9 echo -------------------------------------------------------------------------- echo Migration/Creation of Profile needs to start Firefox once :again echo. echo Please wait until Firefox has started and close it afterwards. Thank you! echo -------------------------------------------------------------------------- pushd "%dest%" firefox.exe" popd echo. echo Press any key to continue after closing Firefox ... pause > nul echo. if not exist "%APPDATA%\Mozilla\Firefox" goto again :extensions echo Installing extensions ... pushd "%dest%" echo ... [adblock] firefox.exe -install-global-extension adblock-0.5-dev.xpi echo ... [popupalt] firefox.exe -install-global-extension popupalt_en.xpi echo ... [mouse gestures] firefox.exe -install-global-extension gestures.xpi echo ... done! popd goto end :exists echo A firefox directory is already present at %dest%! echo Creating Backup at %dest%.sav ... pushd "%PROGRAMFILES%" if exist firefox.sav rd /s /q firefox.sav ren Firefox Firefox.sav if exist firefox goto error popd echo. goto copy :end echo. echo Installation finished! Have a lot of fun ... echo (press any key to close this window) pause > nul goto done :alreadyinstalled echo. echo -------------------------------------------------------------------------- echo ERROR! echo. echo You have another version of Firefox installed (not our version). echo Please remove this version (Control Panel - Add/Remove Programs) and try echo again. Thank you. echo -------------------------------------------------------------------------- echo Press any key to close pause > nul goto done :error echo. echo -------------------------------------------------------------------------- echo ERROR! echo. echo Your Firefox directory is in use! Please close all instances of Firefox. echo Sometimes, Acrobat Reader also causes this problem (kill in TaskManager). echo -------------------------------------------------------------------------- echo Press any key to close pause > nul goto done :done