Link to home
Start Free TrialLog in
Avatar of Scott Thompson
Scott ThompsonFlag for United States of America

asked on

OpenOffice.org 3.3 Silent Install

Okay, this is what I'm trying to do, I want to install OpenOffice 3.3 silently with a batch of other programs included.  I'm trying to add it to my current batch file, but I wrote it seperately at the moment.

This is SUPPOSED to install OpenOffice 3.3, then disable the registration wizard, and also change Writer, Calc, and Impress to default save as Word, Excel, and Powerpoint.  However, after it installs, I cannot open the program.  I get the following error.

OpenOffice.org 3.3 - Fatal Error
The application cannot be started.
A general error occured while accessing your central configuration.

Any suggestions please? :)
Title OpenOffice.org Installation

REM Setting variable
set Thumb=c:
if exist "c:\PCS Auto Install.bat" goto Start
set Thumb=D:
if exist "D:\PCS Auto Install.bat" goto Start
set Thumb=E:
if exist "E:\PCS Auto Install.bat" goto Start
set Thumb=F:
if exist "F:\PCS Auto Install.bat" goto Start
set Thumb=G:
if exist "G:\PCS Auto Install.bat" goto Start
set Thumb=H:
if exist "H:\PCS Auto Install.bat" goto Start
set Thumb=I:
if exist "I:\PCS Auto Install.bat" goto Start
set Thumb=J:
if exist "J:\PCS Auto Install.bat" goto Start
set Thumb=K:
if exist "K:\PCS Auto Install.bat" goto Start
set Thumb=L:
if exist "L:\PCS Auto Install.bat" goto Start
set Thumb=M:
if exist "M:\PCS Auto Install.bat" goto Start
set Thumb=N:
if exist "N:\PCS Auto Install.bat" goto Start
set Thumb=O:
if exist "O:\PCS Auto Install.bat" goto Start
set Thumb=P:
if exist "P:\PCS Auto Install.bat" goto Start
set Thumb=Q:
if exist "Q:\PCS Auto Install.bat" goto Start
set Thumb=R:
if exist "R:\PCS Auto Install.bat" goto Start
set Thumb=S:
if exist "S:\PCS Auto Install.bat" goto Start
set Thumb=T:
if exist "T:\PCS Auto Install.bat" goto Start
set Thumb=U:
if exist "U:\PCS Auto Install.bat" goto Start
set Thumb=V:
if exist "V:\PCS Auto Install.bat" goto Start
set Thumb=W:
if exist "W:\PCS Auto Install.bat" goto Start
set Thumb=X:
if exist "X:\PCS Auto Install.bat" goto Start
set Thumb=Y:
if exist "Y:\PCS Auto Install.bat" goto Start
set Thumb=Z:
if exist "Z:\PCS Auto Install.bat" goto Start
goto end

:Start

echo Install Java?
set /P C=[Y,N]?
if "%C%"=="Y" goto Java
if "%C%"=="y" goto Java
if "%C%"=="N" goto OOo
if "%C%"=="n" goto OOo

:Java
Echo Installing Java
Call "%Thumb%\Programs\OOoSilent\Java\Java 32-bit.exe" /s ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1
echo ]

:OOo
Echo Installing OpenOffice

msiexec /qn /norestart /i %Thumb%\Programs\OOoSilent\OOo\openofficeorg33.msi SETUP_USED=1 ADDLOCAL=ALL

if NOT %PROCESSOR_ARCHITECTURE%==AMD64 goto x86 
set ProFi=C:\Program Files (x86)
goto AMD64
:x86
set ProFi-C:\Program Files
:AMD64

Echo Installing OpenOffice Extension

echo yes | "%ProFi%\OpenOffice.org 3\program\unopkg" add -f -s "%Thumb%\Programs\OOoSilent\Extension\DisableFirstStartWzd_ooo33.oxt"
Echo Copy OpenOffice Configuration files

copy %Thumb%\Programs\OOoSilent\Config\calc.xcd "%ProFi%\OpenOffice.org 3\share\registry\calc.xcd" /Y
copy %Thumb%\Programs\OOoSilent\Config\impress.xcd "%ProFi%\OpenOffice.org 3\share\registry\impress.xcd" /Y
copy %Thumb%\Programs\OOoSilent\Config\writer.xcd "%ProFi%\OpenOffice.org 3\share\registry\writer.xcd" /Y
Pause

Open in new window

Avatar of Scott Thompson
Scott Thompson
Flag of United States of America image

ASKER

Also, trying to get Avast to silently install, but it also installs Google Chrome with it.  Does anybody know a way to NOT have it install Google Chrome?
Avatar of ltlbearand3
pc_solutions,

I don't see anything that jumps out at me right off the bat.  However, this is dependent upon several pieces being correct.  I think you should back track to a simple install and test to make sure it works.  then keep adding pieces until you find the one with the problem.  

I recommend starting with a msiexec line of:
msiexec /norestart /i %Thumb%\Programs\OOoSilent\OOo\openofficeorg33.msi SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL

Run this without being silent to see if you spot one of the errors. The /qn flag also suppresses errors and therefore you will miss it.  The select flags set these programs to open by default in OOo.

Make sure this installs OK and then you can add back in the SETUP_USED=1 option and test again.  The keep adding one part at a time.  My gut instinct is that one of your xcd files is not loading correctly

When all works, add the /qn flag back in to make it silent.

If I run a simple install such as
start /wait msiexec /qn /norestart /i openofficeorg33.msi SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL

From a command line, all installs fine.

Concerning your other question.  That is a separate question and should be posted as a new questoins.

-Bear
ASKER CERTIFIED SOLUTION
Avatar of BillDL
BillDL
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I can post the Avast question in another question if you like.

As for OpenOffice, I run

msiexec /norestart /i %Thumb%\Programs\OOoSilent\OOo\openofficeorg33.msi SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL
and nothing happens.

I add SETUP_USED=1 and it runs, but it comes up with the following error...

Runtime Error!

Program: C:\Program Files (x86)\OpenOffice.org 3\program\unopkg.bin

This application has requested the Runtime to terminate it in an unusual way.  Please contact the application's support team for more information.

Any suggestions?  I'm wondering if it has something to do with the modified calc.xcd, impress.xcd, and writer.xcd, that allows for those programs to default save as Word, Excel, and Powerpoint?
I do believe it is one of the xcd files.  I suggest doing the following in order (Proceed only if the step succeeds):

1.  Unpack a clean OOo install set.  Put this on a jump drive with batch file and see if you can get it to run without the SETUP_USED value and without the lines for putting in the xcd files.
2.  Set up an install set like you have customized xcd files, but use the default xcd files and run your script as written.  (If this fails try running it without the -f and -s swtiches for unopkg)
3.  Repackage your install with your customized xcd files, one at a time and test after each add.  For example create the install with only the calc.xcd file and use the default files for the rest.  See if you can narrow down which one is the culprit.

You can also post your xcd files here if you like and we can take a quick look at them.  
It does work without the SETUP_USED now, but it still comes up with the same error.  and this is not a silent install, this is just with the following code.
Echo Installing OpenOffice

msiexec /norestart /i %Thumb%\Programs\OOoSilent\OOo\openofficeorg33.msi SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL  
Pause

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Still get the runtime error.

Should I just use LibreOffice?  And if I do, how do I make that run silent?
You should could use LibreOffice.  The process will still pretty much be the same as at this stage that fork is fairly similar.  You would still use the /qn switch to make it silent.  

If you want to keep working on OOo, I would need you to post your oxt and xcd files to see if I can duplicate the error and find what is wrong in one of them.  Or you can just let me know exactly what options you are trying to set and I might have time in a day or two to build them and a process for you.

-Bear
Arrgh - Hit submit too soon.  Typo - first line on last post should read:

You sure could use LibreOffice. . . . .
Okay, so I am working on having LibreOffice install silently now, which it does, however I have not attempted to add the modified .xcd files to have it default save as a Microsoft product.  I will continue to work on it and let everyone know.

There is something else on this installation I'm trying to throw in.

That would be the /fo switch.

That way, instead of having to decide to install, I can just let the batch file run and if it's already installed with the latest version, it will skip installing it all together.

However, when I run this switch (ex. start msiexec /passive /norestart /fo "C:\Users\Jeremy S. Leo\Desktop\LibreOffice\libreoffice34.msi" ) , it still installs the program, just over the previous installation.

Any suggestions?
Okay, I believe that I do have libreoffice working without the .xcd files, though I would still like it to default save as a microsoft file.  Also, when it installs, it does not associate itself with the microsoft files, so clicking on a .doc file still asks what to open with.
OK we can try to keep working through the issues.  First off the /fo switch.  The /f switch is actually a repair option for msiexec.  I don't really use this, but with libreoffice, it does run the install again as if it we doing a repair.  You could try and search for an installed version via your batch file and only run the install if the version is above a certain level - however, this would depend on being able to get the version number.  It has been a while since I have done this via batch and seem to remember that many installed product do not return their version number.  It may take a few days, but I can try and find my notes on how to do this.

concerning the defaults did you run the msi file with the "SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL" options?  Give this a try and make sure this part works.

Once that is working, then you will need to go back and create your custom xcd files for LibreOffice to have the file save as option defaulted.
I believe that I finally have it ALMOST done, however it does not create the .xcd files, or I don't remember how to modify them so it will default save as a Microsoft file.

Thank you in advance.
What you need to do is install Libre Office on a test machine.  Then navigate to C:\Program Files\LibreOffice 3.4\Basis\share\registry (or adjust accordingly for Windows 7) and edit the .xcd files.  They are basically xml files.  I just edit them in notepad++.  Most recommend wordpad (regular notepad supposedly caused problems with OOo files).  Find the defaultfilter lines and adjust accordingly.  For example in writer.xcd I found all instances of:
<prop oor:name = "ooSetupFactoryDefaultFilter">
<value>writer8</value>
and replaced it with:
<prop oor:name = "ooSetupFactoryDefaultFilter">
<value>MS Word 2007 XML</value>

This sets the Writer to save in MS Word 2007 docx format.  You will have to set each one for the correct value for the save as type you want.  On your test machine, you can set them all manually and then check C:\Documents and Settings\<<UserNameHere>>\Application Data\LibreOffice\3\user\registrymodifications.xcu to see exactly how the values are stored.  (Again this is an xml file).

Make sure to update your batch file to hit the correct directory for the LibreOffice Install.
LeeTutor,

There are actually several posts that add up to the complete answer.  Since there has been no additional feedback, I assume all issues are now resolved.  There were two separate issues in the original post that in some ways should have been separate posts.  Since I don't know if Avast was covered in a separate post,  I believe BillDL's post (ID 36293705) covered that issue and could be marked as an assist.  For the other part of the question, I would mark my post ID:36292802 as the answer with most of my other comments as assists as they build together based on feedback from the user to create the solution.

-Bear
Sorry I haven't respond.  I will make sure to give credit where credit is due.  I went with going with LibreOffice.  I never got the default save set as Microsoft Office files, but did get LibreOffice to silently install, to default open Microsoft Office files (if no other program does), and to check for java and install it if neccessary.  Here's my code.

Thank you everyone for your help!
:OpenOffice


echo]
Echo Checking for Java Installation

If Exist "%ProFi%\Java\jre6\bin\java.exe" goto JAVACheck

echo]
Echo Installing Java silently...

start /wait msiexec /passive /norestart /i "%Thumb%\Programs\OOoSilent\Java\jre1.6.0_26.msi" ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1

:JAVACheck
echo SUCCESSFUL!
Echo]

Echo Checking for LibreOffice Installation

if exist "%ProFi%\LibreOffice 3.4\program\soffice.exe" goto LOCheck

Echo Installing LibreOffice silently...

start /wait msiexec /passive /norestart /i "%Thumb%\Programs\OOoSilent\OOo\libreoffice34.msi" SELECT_WORD=1 SELECT_EXCEL=1 SELECT_POWERPOINT=1 ADDLOCAL=ALL

:LOCheck
echo SUCCESSFUL!
echo]

Open in new window

Also, for anyone that was wondering about Avast silent install WITHOUT google chrome, here's the code.

:Avast

echo Checking for Avast Installation...

If exist "%ProFi%\AVAST Software\Avast\AvastUI.exe" goto AVASTCheck
if exist "%ProFi%\Alwil Software\Avast5\AvastUI.exe" goto AVASTCheck

echo Avast is currently being installed silently...

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\avsx.exe" /v Debugger /t REG_SZ /d logonui.exe /f
"%Thumb%\Malware Removal\Avast Free Antivirus.exe" /verysilent /norestart /sp-
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\avsx.exe" /f

echo SUCCESSFUL!

:AVASTCheck
Thank you pc_solutions (and ltlbearand3 comment: 36564493).
Although my comment might at first seem like a flippant "install Linux instead" suggestion to address a Windows issue, and didn't actually answer the silent install question, it was made after considered thought and I think it's the better option in the end.