User Tools

Site Tools


userspace:microsoft_office_pro_2010

This is an old revision of the document!


Microsoft Office 2010 / Pro (64 Bit )

Tested with opsi 4.0.1
requiredWinstVersion >= 4.10.8.6
For 32 Bit
By Thomas_H 2011/10/27 12:58

Steps:

  1. copy all files of Setup-CD to CLIENT_DATA
  2. Copy the “config.xml” to CLIENT_DATA/ProPlus.WW

To avoid collisions between 32 and 64 Bit-Office you better have separate opsi-packages for each version.

setup.ins

[Initial]
LogLevel=9
;  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
 
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_Cmd32$
DefVar $Inst_Cmd64$
DefVar $Inst_Prg$
DefVar $Uninst_Cmd$
DefVar $Uninst_Prg$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$       = "Microsoft-Office (64 Bit)"
Set $Version$         = "2011"
Set $MinimumSpace$    = "30 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\Microsoft Office"
Set $InstallDir64$      = "%ProgramFiles64Dir%\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Inst_Prg$ = "setup.exe"
Set $Inst_Cmd64$ = '/config'
Set $Uninst_Cmd$ = ""
Set $Uninst_Prg$ = ""
; ----------------------------------------------------------------
 
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
        LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
        isFatalError
        ; Stop process and set installation status to failed
else
        comment "Show product picture"
        ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$
 
        if $LicenseRequired$ = "true"
                comment "Licensing required, reserve license and get license key"
                Sub_get_licensekey
        endif
 
        comment "Installiere Microsoft Office 2010 (64 Bit)..."
 
        if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
                Message "Dieses Produkt ist nur fuer 64 Bit OS!"
                comment "Fatal: for 64 Bit OS only!"
                isFatalError
                Sub_check_exitcode
        endif
 
        if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
                Message "Installiere " + $ProductId$ + ". Das kann etwas laenger dauern, bitte Geduld..."
                comment "Start setup program"
                Winbatch_install_64
                Files_delete_64
                Sub_check_exitcode
        endif
 
endif
 
[Winbatch_install_64]
; Choose one of the following examples as basis for your installation
; You can use $LicenseKey$ var to pass a license key to the installer
;
; === Nullsoft Scriptable Install System ================================================================
%ScriptPath%\$Inst_Prg$ $Inst_Cmd64$ "%Scriptpath%\ProPlus.WW\config.xml"
 
[Files_delete_64]
; Example of recursively copying some files into the installation directory:
;
delete /s "$InstallDir64$\*.*"
 
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
if ($ExitCode$ = "0")
        comment "Looks good: setup program gives exitcode zero"
else
        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
        if ($ExitCode$ = "1605")
                comment "ERROR_UNKNOWN_PRODUCT  1605    This action is only valid for products that are currently installed."
                comment "Uninstall of a not installed product failed - no problem"
        else
                if ($ExitCode$ = "1641")
                        comment "looks good: setup program gives exitcode 1641"
                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success."
                else
                        if ($ExitCode$ = "3010")
                                comment "looks good: setup program gives exitcode 3010"
                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success."
                        else
                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
                                isFatalError
                        endif
                endif
        endif
endif

uninstall.ins

[Initial]
LogLevel=9
;  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
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
DefVar $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Uninst_Cmd$
DefVar $Uninst_Prg$
 
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       = "Microsoft Office (64 Bit)"
Set $InstallDir32$    = "%ProgramFiles32Dir%\Microsoft Office"
Set $InstallDir64$    = "%ProgramFiles64Dir%\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $LicensePool$     = "p_" + $ProductId$
Set $Uninst_Prg$        = "setup.exe"
Set $Uninst_Cmd$        = " /uninstall ProPlus /config "
; ----------------------------------------------------------------
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".jpg" $ProductId$
 
Message "Deinstalliere " + $ProductId$ + ". Bitte etwas Geduld..."
 
if FileExists($InstallDir64$+"\"+$Uninst_Prg$)
    Set $Uninst_Prg$ = $InstallDir64$+"\"+$Uninst_Prg$
    comment "Start uninstall sub section"
    Sub "%ScriptPath%\delsub.ins"
endif
 
if FileExists("%ScriptPath%\"+$Uninst_Prg$)
    Set $Uninst_Prg$ = "%ScriptPath%\"+$Uninst_Prg$
    comment "Start uninstall sub section"
    Sub "%ScriptPath%\delsub.ins"
endif
 
 
if $LicenseRequired$ = "true"
        comment "Licensing required, free license used"
        Sub_free_license
endif
 
ExitWindows /reboot
 
[Sub_free_license]
comment "License management is enabled and will be used"
 
comment "Trying to free license used for the product"
DefVar $result$
Set $result$ = FreeLicense($LicensePool$)
; If there is an assignment of a license pool to the product, it is possible to use
; Set $result$ = FreeLicense("", $ProductId$)
;
; If there is an assignment of a license pool to a windows software id, it is possible to use
; DefVar $WindowsSoftwareId$
; $WindowsSoftwareId$ = "..."
; set $result$ = FreeLicense("", "", $WindowsSoftwareId$)

delsub.ins

if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
        Message $ProductId$ + " ist nur fuer 64 Bit..."
        comment "Fatal: Nur fuer 32 Bit OS!"
        isFatalError
Mendif
 
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
        Message "Uninstalling " + $ProductId$ + " 64 Bit..."
 
        if FileExists($Uninst_Prg$)
                comment "Uninstall program found, starting uninstall"
                Winbatch_uninstall_64
                comment "Removing "+$InstallDir64$
;               Files_uninstall_64
                sub_check_exitcode
        endif
endif
 
 
[Winbatch_uninstall_64]
; Choose one of the following examples as basis for program uninstall
;
; === Nullsoft Scriptable Install System ================================================================
; "$UninstallProgram64$" /S
;
; === Inno Setup ========================================================================================
; "$UninstallProgram64$" /silent /norestart
 
"$Uninst_Prg$" $Uninst_Cmd$ "%ScriptPath%\ProPlus.WW\SilentUninstallConfig.xml"
 
[Files_uninstall_64]
; Example for recursively deleting the installation directory (don't forget the trailing backslash):
;
delete -sf "$InstallDir64$\"
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
        comment "Looks good: setup program gives exitcode zero"
else
        comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
        if ($ExitCode$ = "1605")
                comment "ERROR_UNKNOWN_PRODUCT  1605    This action is only valid for products that are currently installed."
                comment "Uninstall of a not installed product failed - no problem"
        else
                if ($ExitCode$ = "1641")
                        comment "looks good: setup program gives exitcode 1641"
                        comment "ERROR_SUCCESS_REBOOT_INITIATED 1641    The installer has initiated a restart. This message is indicative of a success."
                else
                        if ($ExitCode$ = "3010")
                                comment "looks good: setup program gives exitcode 3010"
                                comment "ERROR_SUCCESS_REBOOT_REQUIRED  3010    A restart is required to complete the install. This message is indicative of a success."
                        else
                                logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
                                isFatalError
                        endif
                endif
        endif
endif

SilentUninstallConfig.xml

<Configuration Product="ProPlus">
<Display Level="basic" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes" NoCancel="Yes" /> -->M
<Setting Id="SETUP_REBOOT" Value="Never" /> -->M
</Configuration>

You'll have to change some informations in the config.xml. This config.xml will install Word, Excel, Powerpoint and Outlook as local installed applications. MS-Access will installed if needed, also all other components, which are dispensable (in my humble opinion). This config.xml is for the unpatient boss in the company… :))

Search for “192.168.0.1” and change the complete path to the server the installfiles are avail also for the user. Needed, if other components of Office should be installed. Search for “MyOrganisation” and change it to the name of your organisation

userspace/microsoft_office_pro_2010.1319715861.txt.gz · Last modified: 2021/08/23 08:37 (external edit)