Skip to content

opsi.orgheader image

opsi.org
Views
WinstScripts >>

ooffice2.4.1

Document Actions
last edited 4 months ago by sehlers
Qualified for opsi 3.3
---------------------------------------------------------------------
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.

[Initial]
; Message at install time:
Message=Installiere OpenOffice.org 2.4.1
LogLevel=2
;  Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
 
[Aktionen]
DefVar $RebootFlag$
DefVar $WinstRegKey$
DefVar $RebootRegVar$
DefVar $ProductId$
DefVar $InstallDir$
DefVar $NewExe$
DefVar $SYSTEMROOT$
DefVar $SYSTEMDRIVE$
DefVar $TEMP$
DefVar $OS$
DefVar $UninstallCommand$
DefVar $DisplayName$
DefVar $MsiCode$
DefVar $HandleWord$
DefVar $HandleExcel$
DefVar $HandlePowerpoint$

Set $SYSTEMDRIVE$ = "%SYSTEMDRIVE%"
Set $SYSTEMROOT$ = "%SYSTEMROOT%"
Set $TEMP$= EnvVar("TEMP")
set $ProductId$ = "ooffice2"
set $InstallDir$="%ProgramFilesDir%\OpenOffice.org 2.4"
set $NewExe$=$InstallDir$+"\program\soffice.exe"


Set $OS$ = GetOS
; is this a win32 system ?
if ( $OS$ = "Windows_NT" OR $OS$ = "Windows_95" )
  ShowBitmap /3 "%scriptpath%\ooffice.png" "OpenOffice.org 2"
 
  if HasMinimumSpace ("%SYSTEMDRIVE%", "300 MB")

  ; installing ooffice over old version is no problem
  ; reinstalling over actual version hangs so we need to deinstall first
  ; 
  if FileExists("%ScriptPath%\delsub.ins")
;  start uninstall  
   sub "%ScriptPath%\delsub.ins"
  endif
 
   Message "installing ....."
   if inivar("handle_word_doc") = "off" 
    set $HandleWord$ = "SELECT_WORD=0"
   else
    set $HandleWord$ = "SELECT_WORD=1"
   endif 
   if inivar("handle_excel_xls") = "off"
    set $HandleExcel$ = "SELECT_EXCEL=0"
   else
    set $HandleExcel$ = "SELECT_EXCEL=1"
   endif
   if inivar("handle_powerpoint_ppt") = "off"
    set $HandlePowerpoint$ = "SELECT_POWERPOINT=0"
   else
    set $HandlePowerpoint$ = "SELECT_POWERPOINT=1"
   endif
   WinBatch_OpenOffice2
   Files_copy /AllNTUserProfiles
   
   if not(FileExists($NewExe$))
    logError "Fatal: After Installation "+$NewExe$+" not found"
    isFatalError
   endif

;  kundenspezifisches
   if FileExists("%ScriptPath%\custom_ins_dir\custom_ins.ins")
    sub "%ScriptPath%\custom_ins_dir\custom_ins.ins"
   endif

  else
   LogError "Nicht gen�gend Platz auf C:"
   isFatalError
  endif 
 
else
  Message=Dies ist kein 32-Bit Betriebssystem
endif

[WinBatch_OpenOffice2]
%SCRIPTPATH%\files\instmsiw.exe /q
msiexec /l* $TEMP$\openoffice241.txt /qb-! /i %SCRIPTPATH%\files\openofficeorg24.msi ALLUSERS=2 $HandleWord$ $HandleExcel$ $HandlePowerpoint$

[Files_copy]
copy -s %SCRIPTPATH%\user\* "%UserProfileDir%\Anwendungsdaten\OpenOffice.org2\user"