@ECHO OFF     SETLOCAL     :: Find registered Windows user and company name     FOR /F "tokens=*" %%A IN ('WMIC.EXE OS Get Organization^,RegisteredUser /Format:List') DO (         SET %%A>NUL     )     :: Move to the correct location; modify if this batch file is     :: not located in the same directory with the OpenOffice .MSI     PUSHD "%~dp0"     :: No user interface, no reboot, logging enabled     SET MSIArgs=/qn /norestart REBOOT=ReallySuppress /L OpenOffice.log     :: Install everything     SET MSIComp=INSTALLLOCATION=C:\Program Files\OxygenOffice     SET MSIComp=ADDLOCAL=ALL     :: Associate Writer with .DOC and Calc with .XLS extensions     SET MSIComp=%MSIComp% SELECT_WORD=1 SELECT_EXCEL=1     :: Do NOT associate Impress with .PPT     SET MSIComp=%MSIComp% SELECT_POWERPOINT=0     :: Use registered Windows user and company name, if defined     IF NOT "%RegisteredUser%"=="" SET MSIUser=USERNAME="%RegisteredUser%"     IF NOT "%Organization%"==""   SET MSIUser=%MSIUser% COMPANYNAME="%Organization%"     :: Run the installation     START /WAIT MSIEXEC.EXE /I openofficeorg24.msi %MSIArgs% %MSIComp% %MSIUser%     :: Done     POPD     ENDLOCAL