:: usetools.net command shell script :: @echo off cd /d "%~dp0" type descript.ion|find.exe "%~nx0" :: set gooo_exe=gooo.exe set gooo_url=http://go-oo.mirrorbrain.org/stable/win32/3.2.1/GoOo-3.2.1-11.exe set gooo-ru_exe=gooo-ru.exe set gooo-ru_url=http://go-oo.mirrorbrain.org/stable/win32/3.2.1/GoOo-langpack-ru-3.2.1-11.exe :: if exist "%programfiles%\openoffice\offsetup.cmd" start /high /wait /d"%programfiles%\openoffice" offsetup.cmd --uninstall if exist "%programfiles%\openoffice.org\offsetup.cmd" start /high /wait /d"%programfiles%\openoffice.org" offsetup.cmd --uninstall :: if not exist "%gooo_exe%" wget.exe --tries=3 -c %gooo_url% -O%gooo_exe% if not exist "%gooo-ru_exe%" wget.exe --tries=3 -c %gooo-ru_url% -O%gooo-ru_exe% for /f "tokens=3" %%I in ('dir %gooo_exe% ^| find/i "%gooo_exe%"') do ( if %%I EQU 0 del /f /q %gooo_exe%) if not exist %gooo_exe% goto gooo_end :: if exist %gooo_exe% %gooo_exe% /S if exist %gooo-ru_exe% %gooo-ru_exe% /S :: :gooo_end