Anbei die setuo.ins. Bei uns ist per Default O:\ nach Opsi eingestellt.
Das mit einer installierten MSI-Version habe ich getestet. Da gibt es einen reg-key, wenn der bearbeitet wird, können msi und odt gleichzeitig installiert werden.
Hier der Inhalt der Setup.ins
Copyright (c) uib gmbh (
www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits:
http://www.opsi.org/credits/
[Actions]
requiredWinstVersion >= "4.10.5"
;
; requires python-opsi >= (4.0.1.31-1)
; office 2016 Productkey is case sensitiv
;
DefVar $Configuration_Product$
DefVar $MsVersion$
DefVar $Produkt$
DefVar $ProduktId$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $LogDir$
DefVar $TEMP$
DefVar $InstallCommand$
DefVar $OfficeDir$
DefVar $httpproxy$
DefVar $MS_Version$
DefVar $Produkt_Version$
DefVar $activate$
DefVar $lang2install$
DefVar $username$
DefVar $companyname$
DefVar $adddesktopicons$
DefVar $System_Architektur$
DefVar $architecture2use$
DefVar $Office_Version$
DefVar $InterestingFile$
DefVar $Linkname$
DefVar $poolOrKey$
DefVar $method$
DefVar $openkey$
DefVar $MSP$
DefVar $Produkt_Architektur$
DefStringList $microsoftdefaultkmsclientkeylist$
DefVar $rebootrequired$
Set $LogDir$ = "%SystemDrive%\tmp"
Set $TEMP$ = "%SystemDrive%\tmp"
set $rebootrequired$ = "no"
Set $MS_Version$ = GetSystemType
Set $Produkt$ = GetProductProperty("Produkt","Visio")
Set $Office_Version$ = GetProductProperty("Office_Version","Visio_2013")
;Set $Produkt_Version$ = GetProductProperty("Produkt_Version","Pro")
Set $username$ = GetProductProperty("username","Musterschueler")
Set $companyname$ = GetProductProperty("companyname","Musterschule")
Set $System_Architektur$ = GetProductProperty("System_Architektur","x64")
;set $MAK_Aktivierung$ = GetProductProperty("MAK_Aktivierung","")
;set $MSP$ = GetProductProperty("MSP","")
Set $Produkt_Architektur$ = GetProductProperty("Produkt_Architektur","win64")
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;"%installingProdName%"
Set $MinimumSpace$ = "1000 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProduktId$
; ----------------------------------------------------------------
Set $architecture2use$ = "x86"
if ($MS_Version$ = "64 Bit System") and ($System_Architektur$ = "x64") and ($Produkt_Architektur$ = "win64")
Set $architecture2use$ = "x64"
set $InstallDir$ = "%ProgramFiles64Dir%\Microsoft Office"
Set $ProduktId$ = $Produkt$ + " " + $Produkt_Architektur$ + " " + $Produkt_Version$
endif
Set $ProduktId$ = $Produkt$ + " " + $Produkt_Architektur$ + " " + $Produkt_Version$
Set $Configuration_Product$ = "VisPro"
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProduktId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + "visio.png" $Produkt$
if $Office_Version$ = "Visio_2016"
set $OfficeDir$ = $InstallDir$ + "\Office16"
else
if $Office_Version$ = "Visio_2013"
set $OfficeDir$ = $InstallDir$ + "\Office15"
endif
endif
if FileExists($OfficeDir$ + "\visio.exe")
if FileExists("%ScriptPath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins"
endif
endif
Message "Installing " + $ProduktId$ + " ..."
endif
comment "Prepare config.xml"
Files_copyConfigxml
PatchTextFile_patchconfigxml $TEMP$ + "\office\config.xml"
Set $InstallCommand$ = "%SCRIPTPATH%\files\" + $architecture2use$ + "\Setup.exe " + "/config " + "%SystemDrive%\tmp\office\config.xml"
comment "Start setup program"
Winbatch_install
Files_delete
Sub_check_exitcode
;Installation der Servicepacks
if ($Office_Version$ = "Visio_2016")
Message "Setze Office 2016 Hotfix auf Setup"
set $openkey$ = "[Software\Microsoft\Office\16.0\Common\General]"
set $rebootrequired$ = "yes"
if ( $architecture2use$ = "x86" )
Registry_install_hkcu /AllNTUserDats /32Bit
else
Registry_install_hkcu /AllNTUserDats /64Bit
endif
opsiservicecall_set_hotfix2016_to_setup
endif
if ($Office_Version$ = "Visio_2013")
Message "Setze Office 2013 Hotfix auf Setup"
set $openkey$ = "[Software\Microsoft\Office\15.0\Common\General]"
set $rebootrequired$ = "yes"
if ( $architecture2use$ = "x86" )
Registry_install_hkcu /AllNTUserDats /32Bit
else
Registry_install_hkcu /AllNTUserDats /64Bit
endif
opsiservicecall_set_hotfix2013_to_setup
endif
if ($rebootrequired$ = "yes")
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
ExitWindows /Reboot
endif
[Files_copyConfigxml]
copy "%SCRIPTPATH%\config.xml" "$TEMP$\office"
copy "%SCRIPTPATH%\config-uninstall_sharepoint_workspace.xml" "$TEMP$\office"
[PatchTextFile_patchconfigxml]
GoToTop
FindLine_Containing '<Configuration Product='
DeleteTheLine
GoToTop
InsertLine '<Configuration Product="$Configuration_Product$">'
GoToTop
FindLine_Containing '<COMPANYNAME Value='
DeleteTheLine
InsertLine ' <COMPANYNAME Value="$companyname$" />'
GoToTop
FindLine_Containing '<USERNAME Value='
DeleteTheLine
InsertLine ' <USERNAME Value="$username$" />'
[Winbatch_install]
$InstallCommand$
[Files_delete]
delete -sf "$TEMP$\office"
[Winbatch_install_sp1_uninstall_sharepoint_workspace]
$InstallCommand$
[LinkFolder_install]
; Example of creating an shortcut to the installed exe on AllUsers desktop:
;
set_basefolder common_desktopdirectory
set_subfolder ""
set_link
name: $Linkname$
target: $InterestingFile$
parameters:
working_dir: $InstallDir$
icon_file:
icon_index:
end_link
[opsiservicecall_set_hotfix2016_to_setup]
"method": "setProductActionRequest"
"params": [
"office_2016_hotfix",
"%opsiserviceUser%",
"setup"
]
[opsiservicecall_set_hotfix2013_to_setup]
"method": "setProductActionRequest"
"params": [
"office_2013_hotfix",
"%opsiserviceUser%",
"setup"
]
[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 ... S.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."
set $rebootrequired$ = "yes"
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif