Office 2016 Paket

Fujias
Beiträge: 10
Registriert: 09 Nov 2018, 13:16

Office 2016 Paket

Beitrag von Fujias »

Hallo,

ich habe ein Paket für Office 2016 mit dem Template aus dem Wiki erstellt, welches auch funktioniert.
Nun möchte ich aber nur Word, PowerPoint, Excel und Acces installieren. Ich habe schon einige Sachen ausgetestet
und wahrscheinlich ist es ziemlich banal, nur stehe ich irgendwie auf dem Schlauch. :roll:

Die Setup.opsicript sieht folgendermaßen aus:

Code: Alles auswählen

; Author Dominik Daehn, based on Office 2013 Code by Jens Eppler, based on Office 2010 Code by Soren Birk
 
[Actions]
requiredWinstVersion >= "4.11.3.5"
 
DefVar $LogDir$
DefVar $ProductId$ 
DefVar $ProductName$
DefVar $OfficeId$
DefVar $OfficeVersion$
 
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $InstallPfad$
DefVar $SystemType$
DefVar $OfficeArchitecture$
DefVar $LicenseKey$
DefVar $LicenseRequired$
DefVar $LicensePool$
DefVar $UninstallProgram$
DefVar $UninstCmd$
DefVar $ExitCode$
DefVar $exitcodeActivation$
DefVar $Config_Product$
DefVar $Config_Eula$
DefVar $Config_Log$
DefVar $Config_Reboot$
DefVar $UserName$
DefVar $CompanyName$
DefVar $ACCESSFiles$
DefVar $EXCELFiles$
DefVar $GrooveFiles2$
DefVar $OUTLOOKFiles$
DefVar $PPTFiles$
DefVar $PubPrimary$
DefVar $QueryFiles$
DefVar $WORDFiles$
DefVar $XDOCSFiles$
DefVar $LYNCFiles$
DefVar $ONENOTEFiles$
DefVar $VISIOVIEWERFiles$
DefStringList $Products$
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $LogDir$          		= "%SystemDrive%\tmp"
Set $ProductId$       		= "office2016"
Set $ProductName$     		= "Office 2016 Professional Plus"
Set $OfficeId$ 			= "ProPlus"
Set $OfficeVersion$ 		= "Office16"
 
Set $MinimumSpace$    		= "3 GB"
Set $InstallDir$ 		= "Microsoft Office"
Set $SystemType$ 		= GetSystemType
Set $OfficeArchitecture$	= GetProductProperty("architecture","")
Set $LicenseKey$      		= GetProductProperty("LicenseKey","")
;Variablen zum patchen der config.xml
Set $Config_Product$		= '<Configuration Product="' + $OfficeId$ + '">'
Set $Config_Eula$		= '<Display Level="basic" CompletionNotice="no" SuppressModal="yes" AcceptEula="yes" />'
Set $Config_Log$ 		= '<Logging Type="standard" Path="' + $LogDir$ + '" Template="' + $ProductName$ + '_Setup(*).txt" />'
Set $Config_Reboot$		= '<Setting Id="SETUP_REBOOT" Value="Never" />'
Set $UserName$        		= '<USERNAME Value="' + GetProductProperty("username", "Valued Customer") + '" />'
Set $CompanyName$     		= '<COMPANYNAME Value="' + GetProductProperty("companyname", "") + '" />'
Set $Products$        		= GetProductPropertyList("products","True")
Set $ACCESSFiles$     		= takeFirstStringContaining($Products$, "Access")
Set $EXCELFiles$      		= takeFirstStringContaining($Products$, "Excel")
Set $GrooveFiles2$    		= takeFirstStringContaining($Products$, "OneDrive")
Set $OUTLOOKFiles$    		= takeFirstStringContaining($Products$, "Outlook")
Set $PPTFiles$        		= takeFirstStringContaining($Products$, "PowerPoint")
Set $PubPrimary$      		= takeFirstStringContaining($Products$, "Publisher")
Set $WORDFiles$       		= takeFirstStringContaining($Products$, "Word")
Set $LYNCFiles$       		= takeFirstStringContaining($Products$, "Skype")
Set $ONENOTEFiles$    		= takeFirstStringContaining($Products$, "OneNote")
Set $VISIOVIEWERFiles$  	= takeFirstStringContaining($Products$, "VisioViewer")
 
; ----------------------------------------------------------------
 
; The old  comparison [if GetMsVersionInfo < "6"] doesn't work with Windows 10, as the GetMSVersionInfo returns "10.0", which the comparison can't handle properly 
if CompareDotSeparatedNumbers(GetMsVersionInfo,"6.0") < "0"
	LogError "This is for NT 6 (Vista) and above"
	isFatalError
else
	;Die oben ausgelesenen Variablen als PropertyListOption werden zu Strings, die in die config.xml ein- und dem Installer übergeben werden 
	;Access installieren oder nicht
	if not ($ACCESSFiles$ = "")
		Set $ACCESSFiles$  = '<OptionState Id="ACCESSFiles" State="local" Children="force" />'
	else
		Set $ACCESSFiles$  = '<OptionState Id="ACCESSFiles" State="absent" Children="force" />'	
	endif
	;Excel installieren oder nicht (inkl. Datenbankanbindung)
	if not ($EXCELFiles$ = "")
		Set $QueryFiles$  = '<OptionState Id="QueryFiles" State="local" Children="force" />'
		Set $EXCELFiles$  = '<OptionState Id="EXCELFiles" State="local" Children="force" />'
	else
		Set $QueryFiles$  = '<OptionState Id="QueryFiles" State="absent" Children="force" />'	
		Set $EXCELFiles$  = '<OptionState Id="EXCELFiles" State="absent" Children="force" />'
	endif
	;OneDrive installieren oder nicht
	if not ($GrooveFiles2$ = "")
		Set $GrooveFiles2$  = '<OptionState Id="GrooveFiles2" State="local" Children="force" />'
	else
		Set $GrooveFiles2$  = '<OptionState Id="GrooveFiles2" State="absent" Children="force" />'	
	endif
	;Outlook installieren oder nicht
	if not ($OUTLOOKFiles$ = "")
		Set $OUTLOOKFiles$  = '<OptionState Id="OUTLOOKFiles" State="local" Children="force" />'
	else
		Set $OUTLOOKFiles$  = '<OptionState Id="OUTLOOKFiles" State="absent" Children="force" />'	
	endif
	;Powerpoint installieren oder nicht
	if not ($PPTFiles$ = "")
		Set $PPTFiles$  = '<OptionState Id="PPTFiles" State="local" Children="force" />'
	else
		Set $PPTFiles$  = '<OptionState Id="PPTFiles" State="absent" Children="force" />'	
	endif
	;Publisher installieren oder nicht
	if not ($PubPrimary$ = "")
		Set $PubPrimary$  = '<OptionState Id="PubPrimary" State="local" Children="force" />'
	else
		Set $PubPrimary$  = '<OptionState Id="PubPrimary" State="absent" Children="force" />'	
	endif
	;Word installieren oder nicht
	if not ($WORDFiles$ = "")
		Set $WORDFiles$  = '<OptionState Id="WORDFiles" State="local" Children="force" />'
	else
		Set $WORDFiles$  = '<OptionState Id="WORDFiles" State="absent" Children="force" />'	
	endif
	;Skype installieren oder nicht
	if not ($LYNCFiles$ = "")
		Set $LYNCFiles$  = '<OptionState Id="LyncCoreFiles" State="local" Children="force" />'
	else
		Set $LYNCFiles$  = '<OptionState Id="LyncCoreFiles" State="absent" Children="force" />'	
	endif
	;OneNote installieren oder nicht
	if not ($ONENOTEFiles$ = "")
		Set $ONENOTEFiles$  = '<OptionState Id="OneNoteFiles" State="local" Children="force" />'
	else
		Set $ONENOTEFiles$  = '<OptionState Id="OneNoteFiles" State="absent" Children="force" />'	
	endif
	;VisioViewer installieren oder nicht
	if not ($VISIOVIEWERFiles$ = "")
		Set $VISIOVIEWERFiles$  = '<OptionState Id="VisioPreviewerFiles" State="local" Children="force" />'
	else
		Set $VISIOVIEWERFiles$  = '<OptionState Id="VisioPreviewerFiles" State="absent" Children="force" />'	
	endif
 
	if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
		LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on dirve %SystemDrive% is needed for " + $ProductId$
		isFatalError "Not enough space"
	else
		if ($OfficeArchitecture$ = "x64") AND ($SystemType$ = "x86 System")
			set $OfficeArchitecture$ = "x86"
			comment "change Office architecture to Office x86"
		endif	
		comment "Display product logo"
		ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductName$
 
		comment "Copying empty config.xml to $LogDir$"
		Files_copy_patchtextfile
 
		comment "Patching config.xml"
		PatchTextFile_config_xml $LogDir$ + "\config.xml"
 
		if FileExists("%ScriptPath%\delsub32.opsiscript")
			comment "Start uninstall sub section delsub32"
			Sub "%ScriptPath%\delsub32.opsiscript"
		endif
 
		if FileExists("%ScriptPath%\delsub64.opsiscript")
			comment "Start uninstall sub section delsub64"
			Sub "%ScriptPath%\delsub64.opsiscript"
		endif
 
		Message "Installing " + $ProductId$ + " ..." 
 
		if ($OfficeArchitecture$ = "x86") AND ($SystemType$ = "64 Bit System")
			set $InstallPfad$ = "%ProgramFiles32Dir%"
		else
			set $InstallPfad$ = "%ProgramFiles64Dir%"
		endif
 
		comment "Start setup program"
		ChangeDirectory "%SCRIPTPATH%"
		Winbatch_install
		Sub_check_exitcode
 
		if not ($LicenseKey$ = "")
			comment "Set License Key"
			DosInAnIcon_set_key
			set $exitcodeActivation$ = getLastExitCode
				if not ($exitcodeActivation$ = "0")
					LogError "Exitcode unequal zero: "+$exitcodeActivation$+" Activation seems to be failed !"
					isFatalError "activation failed"
				else
					comment "Activation seems to be successful: exit code = 0"
				endif
		endif
	endif
endif
 
[Files_copy_patchtextfile]
copy "%ScriptPath%\config.xml" $LogDir$
 
[PatchTextFile_config_xml]
FindLine "</Configuration>"
InsertLine '$LYNCFiles$'
InsertLine '$ONENOTEFiles$'
InsertLine '$VISIOVIEWERFiles$'
InsertLine '$WORDFiles$'
InsertLine '$QueryFiles$'
InsertLine '$PubPrimary$'
InsertLine '$PPTFiles$'
InsertLine '$OUTLOOKFiles$'
InsertLine '$GrooveFiles2$'
InsertLine '$EXCELFiles$'
InsertLine '$ACCESSFiles$'
InsertLine '$CompanyName$'
InsertLine '$UserName$'
InsertLine '$Config_Reboot$'
InsertLine '$Config_Log$'
InsertLine '$Config_Eula$'
InsertLine '$Config_Product$'
 
[Winbatch_install]
"%ScriptPath%\x64\setup.exe" /config "%ScriptPath%\config.xml"
 
[DosInAnIcon_set_key]	
cscript //b "$InstallPfad$\$InstallDir$\$OfficeVersion$\ospp.vbs" /inpkey:$LicenseKey$
exit %ERRORLEVEL%
 
[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
Wenn man sich beispielsweise den Codeabschnitt anguckt, müsste man doch eigentlich nur die Variable $OUTLOOKFiles$ = "" setzen, damit diese nicht installiert wird.

Code: Alles auswählen

;Outlook installieren oder nicht
	if not ($OUTLOOKFiles$ = "")
		Set $OUTLOOKFiles$  = '<OptionState Id="OUTLOOKFiles" State="local" Children="force" />'
	else
		Set $OUTLOOKFiles$  = '<OptionState Id="OUTLOOKFiles" State="absent" Children="force" />'	
	endif
Diese habe ich dann unter

Code: Alles auswählen

Set $OUTLOOKFiles$    		= takeFirstStringContaining($Products$, "Outlook")
auf "" gesetzt, nur leider scheint die Syntax nicht ganz zu stimmen.

Hat jemand einen schlauen Einfall und könnte mir helfen? :)
d.haberland
Beiträge: 46
Registriert: 27 Sep 2017, 16:47

Re: Office 2016 Paket

Beitrag von d.haberland »

Hallo Fujias,


ich habe es bei mir mit einen XML Editor gelöst. (https://officedev.github.io/Office-IT-P ... ditor.html)
leider funktioniert die Seite nicht mehr und es gibt eine neue (https://config.office.com)
über eine XML würde das ungefähr so aussehen:

Code: Alles auswählen

<Configuration>
  <Add OfficeClientEdition="64" Branch="Current"> //Office 365 64 Bit
    <Product ID="ProPlusRetail">	Office365 ProPlus ansonsten O365BusinessRetail
      <Language ID="de-de" />		//Hier wird gesagt was wie nicht installiert haben wollen
      <ExcludeApp ID="OneNote" />
      <ExcludeApp ID="InfoPath" />
      <ExcludeApp ID="Lync" />
      <ExcludeApp ID="OneDrive" />
      <ExcludeApp ID="Publisher" />
      <ExcludeApp ID="Project" />
      <ExcludeApp ID="SharePointDesigner" />
      <ExcludeApp ID="Outlook" />
      <ExcludeApp ID="Visio" />
    </Product>
  </Add>
</Configuration>
scherno
Beiträge: 4
Registriert: 23 Nov 2018, 07:01

Re: Office 2016 Paket

Beitrag von scherno »

Hi,

der Editor ist noch nutzbar, man muss nur n paar Sachen wegschneiden

Chrome -> Entwicklertools

Bild
https://picload.org/view/dcowaddr/geht.png.html
Ja ist hässlich :)
Fujias
Beiträge: 10
Registriert: 09 Nov 2018, 13:16

Re: Office 2016 Paket

Beitrag von Fujias »

Danke für die Antworten :)
Ich habe mir eine neue Config.xml erstellt und diese sieht nun folgendermaßen aus:

Code: Alles auswählen

<Configuration>
    <Add OfficeClientEdition="64" Channel="Current">
	<Display Level="Basic" CompletionNotice="no" SuppressModal="yes" NoCancel="yes" AcceptEula="yes" />
        <Product ID="O365ProPlusRetail">
	<PIDKEY Value="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" /> 
            <Language ID="de-de"/>
            <ExcludeApp ID="OneDrive"/>
            <ExcludeApp ID="Outlook"/>
            <ExcludeApp ID="OneNote"/>
            <ExcludeApp ID="Lync"/>
            <ExcludeApp ID="Groove"/>
            <ExcludeApp ID="Publisher"/>
        </Product>
    </Add>
</Configuration>
Den Lizenzkey habe ich mal ausgeblendet. Leider habe ich jetzt das Problem, dass ich bei der Installation von Office 2016 am Anfang die AGBs von Microsoft bestätigen muss, vorher lief das so durch :( Dadurch wird nicht automatisch installiert, sondern ganz normal das Setup geöffnet, wo ich dann einstellen kann welche Pakete ich installiert haben möchte, es sind aber trotz der Excludes alle Pakete angehakt.

Kann es sein, dass für Office 2016 Professional Plus eine andere Product ID benötigt wird? Leider konnte ich mit dem XML Editor nur Office 365 wählen.

Grüße
Fujias
scherno
Beiträge: 4
Registriert: 23 Nov 2018, 07:01

Re: Office 2016 Paket

Beitrag von scherno »

Code: Alles auswählen

...
<Product ID="ProPlusRetail">
<Language ID="de-DE" />
...
für Microsoft Office 2016 Professional Plus (klickrunzeug)

nutze

officedeploymenttool_8529.3600.exe
<Configuration>

<Add SourcePath="C:\Preload\" officeClientEdition="64" >
<Product ID="ProPlusRetail">
<Language ID="de-DE" />
<ExcludeApp ID="Access" />
<ExcludeApp ID="Groove" />
<ExcludeApp ID="InfoPath" />
<ExcludeApp ID="Lync" />
<ExcludeApp ID="OneNote" />
<ExcludeApp ID="Outlook" />
<ExcludeApp ID="Publisher" />
<ExcludeApp ID="SharePointDesigner" />
</Product>
</Add>

</Configuration>
Bild
https://share-your-photo.com/c566176d35
(funktionioniert 100% ohne eingabe, habs damals extra so weggespeichert nach dem wahnsinn)

würde komplett auf dasdeployment-tool setzen mit opsi
https://docs.microsoft.com/en-us/deploy ... yment-tool
https://docs.microsoft.com/en-us/deploy ... yment-tool

Vorgänger installiert mit click2run?
https://support.office.com/de-de/articl ... df5dbf61d8

https://www.tecchannel.de/a/installatio ... en,3277655
d.haberland
Beiträge: 46
Registriert: 27 Sep 2017, 16:47

Re: Office 2016 Paket

Beitrag von d.haberland »

Bei meiner XML ist der Teil

Code: Alles auswählen

 <Display Level="Basic" CompletionNotice="no" SuppressModal="yes" NoCancel="yes" AcceptEula="yes" />
zwischen </Add> und </Configuration> liegt da der Fehler.

Grüße
scherno
Beiträge: 4
Registriert: 23 Nov 2018, 07:01

Re: Office 2016 Paket

Beitrag von scherno »

<Configuration>
<Add OfficeClientEdition="64" Channel="Current">
<Display Level="Basic" CompletionNotice="no" SuppressModal="yes" NoCancel="yes" AcceptEula="yes" />
<Product ID="O365ProPlusRetail">
<PIDKEY Value="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" />
<Language ID="de-de"/>
<ExcludeApp ID="OneDrive"/>
<ExcludeApp ID="Outlook"/>
<ExcludeApp ID="OneNote"/>
<ExcludeApp ID="Lync"/>
<ExcludeApp ID="Groove"/>
<ExcludeApp ID="Publisher"/>
</Product>
</Add>
</Configuration>

Code: Alles auswählen

<Configuration>
<Add SourcePath="\\Server\Share" officeClientEdition="64" AllowCdnFallback="False">
    <Product ID="ProPlusRetail">
	  <Product PIDKEY="xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-">		
	    <Property Name="AUTOACTIVATE" Value="1" />
	    <Property Name="PinIconsToTaskbar" Value="TRUE"/>
	    <Language ID="de-DE"/>
	 <ExcludeApp ID="OneDrive"/>
	 <ExcludeApp ID="Outlook"/>
	 <ExcludeApp ID="OneNote"/>
	 <ExcludeApp ID="Lync"/>
	 <ExcludeApp ID="Groove"/>
	 <ExcludeApp ID="Publisher"/>
   </Product>
</Add>
<Display Level="Full" AcceptEULA="TRUE" />
</Configuration>
Wichtig ist was am Ende /> oder > steht.

Du musst auch Pfade angeben https://docs.microsoft.com/en-us/deploy ... yment-tool
Fujias
Beiträge: 10
Registriert: 09 Nov 2018, 13:16

Re: Office 2016 Paket

Beitrag von Fujias »

Vielen Dank für die zahlreichen Antworten. :)
Ich versuche es momentan noch ohne dem Deployment Kit.

Mein Code sieht jetzt folgendermaßen aus:

Code: Alles auswählen

<Configuration>
<Add officeClientEdition="64" AllowCdnFallback="False">
    <Product ID="ProPlusRetail">
     <Product PIDKEY="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX">      
       <Property Name="AUTOACTIVATE" Value="1" />
       <Property Name="PinIconsToTaskbar" Value="TRUE"/>
       <Language ID="de-DE"/>
    <ExcludeApp ID="OneDrive"/>
    <ExcludeApp ID="Outlook"/>
    <ExcludeApp ID="OneNote"/>
    <ExcludeApp ID="Lync"/>
    <ExcludeApp ID="Groove"/>
    <ExcludeApp ID="Publisher"/>
   </Product>
</Add>
<Display Level="Full" AcceptEULA="TRUE" />
</Configuration>
Nun fängt bei mir die Installation nicht an, als Fehler gibt er "Setup cant find or validate an installation file" aus.
Ich denke mal, dass er den SourcePath="\\Server\Share" benötigt. Ist das in meinem Fall ohne Deployment Tool nötig?
Reicht denn zb SourcePath="\\IP Opsi Server\Pfad zur Installation" ? Oder wie muss ich das ganze verstehen?

Noch mal vielen Danke, auch wenn ich wahrscheinlich ziemlich dumme Fragen stelle :lol:
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: Office 2016 Paket

Beitrag von SisterOfMercy »

Huh, I don't get it. But it's weekend and late (early) so I had a bit too much.

Look at my setup script and office2016setup.xml file:

Code: Alles auswählen

; 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/en/credits/
;
; License Management removed


[Actions]
;SetLogLevel=9
requiredWinstVersion >= "4.11.5.14"

DefVar $MsiId32$
;DefVar $UninstallProgram32$
DefVar $MsiId64$
;DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $INST_SystemType$
;DefVar $INST_architecture$
DefVar $INST_MsVersion$

DefVar $INST_outlook$
DefVar $INST_onenote$
DefVar $INST_publisher$
DefVar $INST_32bit$

set $INST_MsVersion$ = GetMsVersionInfo
Set $INST_SystemType$ = GetSystemType
;set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"

set $INST_outlook$ = GetProductProperty("install_outlook","true")
set $INST_onenote$ = GetProductProperty("install_onenote","false")
set $INST_publisher$ = GetProductProperty("install_publisher","false")
set $INST_32bit$ = GetProductProperty("install_32bit","false")

; ----------------------------------------------------------------
; - 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-2016"
Set $MinimumSpace$    = "5000 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\Microsoft Office"
Set $InstallDir64$      = "%ProgramFiles64Dir%\Microsoft Office"
; ----------------------------------------------------------------

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
endif
if CompareDotSeparatedNumbers($INST_MsVersion$, "<", "5.1")
	LogError "Windows XP or newer is required for " + $ProductId$  
	isFatalError
endif

comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$

if FileExists("%ScriptPath%\shellfolders3264.opsiscript")
	comment "Set Shell Folders section"
	Sub "%ScriptPath%\shellfolders3264.opsiscript"
endif

if FileExists("%ScriptPath%\delsub3264.opsiscript")
	comment "Start uninstall sub section"
	Sub "%ScriptPath%\delsub3264.opsiscript"
endif
	
comment "installing"

if (($INST_SystemType$ = "x86 System") or ($INST_32bit$ = "true"))
;and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
	Message "Installing " + $ProductId$ + "..."
	Files_preinstall /SysNative
	comment "modify setup configuration file"
	if ($INST_outlook$ = "true")
		PatchTextFile_Outlook $LogDir$ + "\office2016setup.xml"
	endif
	if ($INST_onenote$ = "true")
		PatchTextFile_Onenote $LogDir$ + "\office2016setup.xml"
	endif
	if ($INST_publisher$ = "true")
		PatchTextFile_Publisher $LogDir$ + "\office2016setup.xml"
	endif	
	comment "Start setup program"
	Winbatch_install_32 /SysNative
	Sub_check_exitcode
	comment "Copy files"
	Files_install_32 /SysNative
	Files_install_AllProfiles /AllNtUserProfiles
	comment "Patch Registry"
	Registry_install /SysNative
	Registry_install_AllProfiles /AllNTUserDats
	comment "Create shortcuts"
	LinkFolder_install_32
	if ($INST_outlook$ = "true")
		LinkFolder_install_outlook_32
	endif
	if ($INST_onenote$ = "true")
		LinkFolder_install_onenote_32
	endif
	if ($INST_publisher$ = "true")
		LinkFolder_install_publisher_32
	endif	
endif

if (($INST_SystemType$ = "64 Bit System") and ($INST_32bit$ = "false"))
;and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
	Message "Installing " + $ProductId$ + "..."
	Files_preinstall /64Bit
	comment "modify setup configuration file"
	if ($INST_outlook$ = "true")
		PatchTextFile_Outlook $LogDir$ + "\office2016setup.xml"
	endif
	if ($INST_onenote$ = "true")
		PatchTextFile_Onenote $LogDir$ + "\office2016setup.xml"
	endif
	if ($INST_publisher$ = "true")
		PatchTextFile_Publisher $LogDir$ + "\office2016setup.xml"
	endif	
	comment "Start setup program"
	Winbatch_install_64 /64Bit
	Sub_check_exitcode
	comment "Copy files"
	Files_install_64 /64Bit
	Files_install_AllProfiles /AllNtUserProfiles
	comment "Patch Registry"
	Registry_install /64Bit
	Registry_install_AllProfiles /AllNTUserDats
	comment "Create shortcuts"
	LinkFolder_install_64
	if ($INST_outlook$ = "true")
		LinkFolder_install_outlook_64
	endif
	if ($INST_onenote$ = "true")
		LinkFolder_install_onenote_64
	endif
	if ($INST_publisher$ = "true")
		LinkFolder_install_publisher_64
	endif	
endif
	

[Files_preinstall]
delete -f "$LogDir$\office2016setup.xml"
copy "%ScriptPath%\files\office2016setup.xml" "$LogDir$"

[Winbatch_install_32]
"%ScriptPath%\files\x86\setup.exe" /config "$LogDir$\office2016setup.xml"

[Winbatch_install_64]
"%ScriptPath%\files\x64\setup.exe" /config "$LogDir$\office2016setup.xml"

[Files_install_32]
; Example of recursively copying some files into the installation directory:
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir32$"

[Files_install_64]
; Example of recursively copying some files into the installation directory:
;
; copy -s "%ScriptPath%\files\*.*" "$InstallDir64$"

[Files_install_AllProfiles]
; Example of recursively copying some files into each user profile directory:
;
; copy -s "%ScriptPath%\files\*.*" "%UserProfileDir%"

[PatchTextFile_Outlook]
GoToTop
FindLine_Containing'<OptionState Id="OUTLOOKFiles" State="Absent" Children="force" />'
DeleteTheLine
InsertLine'<OptionState Id="OUTLOOKFiles" State="Local" />'
AppendLine'		<OptionState Id="Outlook_PIA" State="Absent" Children="force" />'
AppendLine'		<OptionState Id="OutlookImportExportFiles" State="Local" />'
AppendLine'			<OptionState Id="OutlookDVExtensionsFiles" State="Local" />'
AppendLine'				<OptionState Id="OutlookDVCsvWinFiles" State="Local" />'
AppendLine'		<OptionState Id="OutlookVBScript" State="Absent" Children="force" />'
AppendLine'		<OptionState Id="OutlookMessaging" State="Local" />'
AppendLine'			<OptionState Id="OutlookMAPI2" State="Local" />'
AppendLine'				<OptionState Id="OutlookMAPICONTAB2" State="Local" />'
AppendLine'				<OptionState Id="OutlookMAPIEMS2" State="Local" />'
AppendLine'				<OptionState Id="OutlookMAPILDAP2" State="Local" />'
AppendLine'				<OptionState Id="OutlookMAPIPST2" State="Local" />'
AppendLine'		<OptionState Id="OutlookAddIns" State="Absent" Children="force" />'
AppendLine'			<OptionState Id="OutlookAddIn_SPS" State="Absent" Children="force" />'
AppendLine'			<OptionState Id="OutlookSocialConnector" State="Absent" Children="force" />'
AppendLine'		<OptionState Id="OutlookStationeryFiles" State="Absent" Children="force" />'
AppendLine'			<OptionState Id="OutlookStationeryBasicFiles" State="Absent" Children="force" />'
AppendLine'			<OptionState Id="OutlookStationeryExtended" State="Absent" Children="force" />'
AppendLine'		<OptionState Id="OutlookTemplateFiles" State="Absent" Children="force" />'

[PatchTextFile_Onenote]
GoToTop
FindLine_Containing'<OptionState Id="OneNoteFiles" State="Absent" Children="force" />'
DeleteTheLine
InsertLine'<OptionState Id="OneNoteFiles" State="Local" />'
AppendLine'		<OptionState Id="OneNoteHandwritingFonts" State="Absent" Children="force" />'
AppendLine'		<OptionState Id="OneNotePIA" State="Absent" Children="force" />'
AppendLine'		<OptionState Id="OneNoteToAddIns" State="Local" />'
AppendLine'			<OptionState Id="OneNoteToIEAddin" State="Absent" Children="force" />'
AppendLine'			<OptionState Id="OneNoteToOLAddin" State="Local" />'

[PatchTextFile_Publisher]
GoToTop
FindLine_Containing'<OptionState Id="PubPrimary" State="Absent" Children="force" />'
DeleteTheLine
InsertLine'<OptionState Id="PubPrimary" State="Local" />'
AppendLine'		<OptionState Id="Publisher_PIA" State="Absent" Children="force" />'

[Registry_install]
; Example of setting some values of an registry key:
;
; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
; set "name1" = "some string value"
; set "name2" = REG_DWORD:0001
; set "name3" = REG_BINARY:00 af 99 cd

[Registry_install_AllProfiles]
; Remove stored start menu order
deletekey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu]

[LinkFolder_install_32]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Excel 2016"
	target: "$InstallDir32$\Office16\excel.exe"
	parameters:
	working_dir: "$InstallDir32$\Office16"
	icon_file: "$InstallDir32$\Office16\excel.exe"
	icon_index: 0
end_link
set_link
	name: "Powerpoint 2016"
	target: "$InstallDir32$\Office16\powerpnt.exe"
	parameters:
	working_dir: "$InstallDir32$\Office16"
	icon_file: "$InstallDir32$\Office16\powerpnt.exe"
	icon_index: 0
end_link
set_link
	name: "Word 2016"
	target: "$InstallDir32$\Office16\winword.exe"
	parameters:
	working_dir: "$InstallDir32$\Office16"
	icon_file: "$InstallDir32$\Office16\winword.exe"
	icon_index: 0
end_link

[LinkFolder_install_64]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Excel 2016"
	target: "$InstallDir64$\Office16\excel.exe"
	parameters:
	working_dir: "$InstallDir64$\Office16"
	icon_file: "$InstallDir64$\Office16\excel.exe"
	icon_index: 0
end_link
set_link
	name: "Powerpoint 2016"
	target: "$InstallDir64$\Office16\powerpnt.exe"
	parameters:
	working_dir: "$InstallDir64$\Office16"
	icon_file: "$InstallDir64$\Office16\powerpnt.exe"
	icon_index: 0
end_link
set_link
	name: "Word 2016"
	target: "$InstallDir64$\Office16\winword.exe"
	parameters:
	working_dir: "$InstallDir64$\Office16"
	icon_file: "$InstallDir64$\Office16\winword.exe"
	icon_index: 0
end_link

[LinkFolder_install_outlook_32]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Outlook 2016"
	target: "$InstallDir32$\Office16\outlook.exe"
	parameters:
	working_dir: "$InstallDir32$\Office16"
	icon_file: "$InstallDir32$\Office16\outlook.exe"
	icon_index: 0
end_link

[LinkFolder_install_outlook_64]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Outlook 2016"
	target: "$InstallDir64$\Office16\outlook.exe"
	parameters:
	working_dir: "$InstallDir64$\Office16"
	icon_file: "$InstallDir64$\Office16\outlook.exe"
	icon_index: 0
end_link

[LinkFolder_install_onenote_32]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Onenote 2016"
	target: "$InstallDir32$\Office16\onenote.exe"
	parameters:
	working_dir: "$InstallDir32$\Office16"
	icon_file: "$InstallDir32$\Office16\onenote.exe"
	icon_index: 0
end_link

[LinkFolder_install_onenote_64]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Onenote 2016"
	target: "$InstallDir64$\Office16\onenote.exe"
	parameters:
	working_dir: "$InstallDir64$\Office16"
	icon_file: "$InstallDir64$\Office16\onenote.exe"
	icon_index: 0
end_link

[LinkFolder_install_publisher_32]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Publisher 2016"
	target: "$InstallDir32$\Office16\mspub.exe"
	parameters:
	working_dir: "$InstallDir32$\Office16"
	icon_file: "$InstallDir32$\Office16\mspub.exe"
	icon_index: 0
end_link

[LinkFolder_install_publisher_64]
set_basefolder common_programs
set_subfolder "Microsoft Office 2016"
set_link
	name: "Publisher 2016"
	target: "$InstallDir64$\Office16\mspub.exe"
	parameters:
	working_dir: "$InstallDir64$\Office16"
	icon_file: "$InstallDir64$\Office16\mspub.exe"
	icon_index: 0
end_link

[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

Code: Alles auswählen

<Configuration Product="Standard">
	<Display Level="Basic" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes"  NoCancel="Yes" />
	
	<Setting Id="SETUP_REBOOT" Value="Never" />
	<Setting Id="HIDEUPDATEUI" Value="True" />
	<Setting Id="REBOOT" Value="ReallySuppress"/>
	<!-- Dit is de KMS client key van Office 2016 Professional Plus  -->	
	<PIDKEY Value="JNRGM-WHDWX-FJJG3-K47QV-DRTFM"/>
	<AddLanguage Id="nl-nl" ShellTransform="Yes" />
	
<!--
Ace_PIA			.NET Programmability Support
AceFiles		Microsoft Office Access database engine
AceOdbc			Microsoft Office Access Database Engine ODBC
ClviewFiles		Microsoft Office Client Viewer
DocumentImagingUtils	Scanning, OCR and Indexing Service Filter
Excel_PIA		.NET Programmability Support
Excel_PP		PowerPivot Support
Excel_WISPFiles	
ExcelAddInEuroToolFiles		Euro Currency Tools
ExcelAddinFiles	Add-ins
ExcelAddInPowerMapFiles		PowerMap for Excel Add-in
ExcelAddInPowerPivotFiles	PowerPivot for Excel Add-in
ExcelAddInPowerViewFiles	PowerView for Excel Add-in
ExcelConverter12Files	
EXCELFiles				Microsoft Excel
ExcelPowerQueryFiles	Power Query for Excel
Forms_PIA				Microsoft Forms 2.0 .NET Programmability Support
Gimme_OnDemandData		GIMME OnDemand Feature.
Graph_PIA				.NET Programmability Support
GRAPHFiles				Microsoft Graph
GraphicsFiltersFile		Graphics Filters
GrooveFiles2			Microsoft OneDrive for Business
IMNFiles	
InternationalSupportFiles_JPN	Japanese Font
LISTFiles					Microsoft Office Access Web Datasheet Component
MetricConverter				Measurement Converter Action Recognizer
MSTagPluginBiblioDataFiles	Bibliographic Information Smart Tag Plugin
MSTagPluginBiblioFiles		Bibliographic Information Smart Tag Plugin
MSTagPluginDateFiles		Date Smart Tag Plugin
MSTagPluginIMContactFiles	Instant Messaging Contact Smart Tag Plugin
MSTagPluginNamesFiles		Name Smart Tag Plugin
MSTagPluginsFiles			Smart Tag Plugins
OfficeDigitalSFiles			Digital Certificate for VBA Projects
OfficeDLPFiles				DLP Support
OneNoteFiles				Microsoft OneNote
OneNoteHandwritingFonts		Handwriting Fonts
OneNotePIA				.NET Programmability Support
OneNoteQuickNote	
OneNoteToIEAddin	Internet Explorer Add-in
OneNoteToOLAddin	Outlook Add-in
OrgChartFiles		Organization Chart Add-in for Microsoft Office programs
OsmAdminUX		OSM Admin UX
OsmClientUX		OSM Client UX
OsmSKUMain		OSM Package
Outlook_PIA			.NET Programmability Support
OutlookAddIn_SPS	Office SharePoint Server Colleague Recommendations Add-In
OutlookDefaults				Microsoft Outlook
OutlookDVCsvWinFiles		Text (Win)
OutlookDVExtensionsFiles	Import from Other Formats
OUTLOOKFiles				Microsoft Outlook
OutlookImportExportFiles	Importers and Exporters
OutlookMAPI2				Outlook Mapi Service Providers
OutlookMAPICONTAB2			Outlook Address Book
OutlookMAPIEMS2				Microsoft Exchange Server
OutlookMAPILDAP2			Microsoft LDAP Directory
OutlookMAPIPST2				Outlook Data Files
OutlookMessaging			Outlook Messaging Components
OutlookOms					Outlook Mobile Service
OutlookSocialConnector	Outlook Social Connector 2013
OutlookVBScript			Visual Basic Scripting Support
PowerPoint_PIA			.NET Programmability Support
PPTFiles				Microsoft Office PowerPoint
PPTPresentationTemplates	PowerPoint Templates
PPTSoundFiles			Animation Sound Effects
ProductFiles			Microsoft Office
ProofingParent			Proofing Tools
PubComPrinting				Commercial Printing
PubComPrintingEnRGBCMYK		Enhanced RGB to CMYK Conversion
PubFontsBalanceSys			Additional TrueType Fonts
Publisher_PIA				.NET Programmability Support
PubPaperDirect			PaperDirect Previews
PubPrimary				Microsoft Office Publisher
PubWizards				Publisher Templates
PubWizardsTier2			Business Publications
PubWizardsTier3			Other Publications
QueryFiles				Microsoft Query
SetLanguageFiles	Language Settings Tool
SmartTag_PIA		Smart Tag .NET Programmability Support
TCDRegistration		Microsoft Office Download Control
TextConverters			Text Converters
ThemesAdditionalFiles	Additional Themes
ThemesTypicalFiles		Typical Themes
TranslationCore			Translation Core Files
VBAFiles				Visual Basic for Applications
VSTO			Microsoft Office Visual Studio Tools for Office
VSTOCLR35		Microsoft Office Visual Studio Tools for Office
VSTOCLR40		Microsoft Office Visual Studio Tools for Office
WebDiscussFiles	Microsoft Sharepoint Foundation Support
WISPFiles		Microsoft Handwriting Component
WixSwidTag		ISO/IEC 19770-2
Word_PIA		.NET Programmability Support
WORDBibliographyFiles	Bibliography Files
WORDBordersFiles		Page Border Art
WORDDocumentTemplates	Word Templates
WORDFiles		Microsoft Word
WordPdfi		IFDP
WORDSharedFiles	Microsoft Word
WxpFiles			Microsoft Office Workspaces
XDOCSEditorFiles	Microsoft Office InfoPath
-->

	<!-- Diverse crap niet installeren.  -->
	<OptionState Id="VSCommonPIAHidden" State="Absent" Children="force" />
	<OptionState Id="dummy_Office_PIA" State="Absent" Children="force" />
	<OptionState Id="OfficeDLPFiles" State="Absent" Children="force" />

	<!-- Access niet installeren.  -->
<!--	<OptionState Id="AceFiles" State="Absent" Children="force" /> -->
		<OptionState Id="Ace_PIA" State="Absent" Children="force" />
<!--		<OptionState Id="Access_PIA" State="Absent" Children="force" /> -->

	<!-- Excel wel installeren, maar die .net, invoegtoepassingen en voorbeeldbestanden zijn niet nodig.  -->
	<OptionState Id="EXCELFiles" State="Local" />
		<OptionState Id="Excel_PIA" State="Absent" Children="force" />
		<OptionState Id="ExcelAddinFiles" State="Absent" Children="force" />
			<OptionState Id="ExcelAddInEuroToolFiles" State="Absent" Children="force" />
			<OptionState Id="ExcelAddInPowerViewFiles" State="Absent" Children="force" />
			<OptionState Id="ExcelAddInPowerMapFiles" State="Absent" Children="force" />
			<OptionState Id="ExcelAddInPowerPivotFiles" State="Absent" Children="force" />
		<OptionState Id="ExcelSampleFiles" State="Absent" Children="force" />

	<!-- Onedrive niet installeren, is toch zooi.  -->
	<OptionState Id="GrooveFiles2" State="Absent" Children="force" />
	<OptionState Id="GrooveShellIntegration32" State="Absent" Children="force" />

	<!-- Onenote niet installeren, is ook zooi.  -->
	<OptionState Id="OneNoteFiles" State="Absent" Children="force" />

	<!-- Outlook niet installeren.  -->
	<OptionState Id="OUTLOOKFiles" State="Absent" Children="force" />

	<!--		wat is deze crap? 			
		<Option Id="OutlookSearchPHAndPluginReg" DefaultState="Local" DisallowAbsent="yes" DisallowAdvertise="yes" Hidden="yes">
		<Option Id="OutlookSearchShellReg" DefaultState="Local" DisallowAbsent="no" DisallowAdvertise="yes" Hidden="yes">
		<Option Id="OutlookOms" DefaultState="FollowParent" DisallowAbsent="yes" DisallowAdvertise="no" Hidden="yes"/>
		<Option Id="OutlookSearchShellRegIntl" DefaultState="Local" DisallowAbsent="no" DisallowAdvertise="yes" Hidden="yes">	-->
		
	<!-- Powerpoint wel installeren, maar die .net, organigram en verborgen templates zijn niet nodig. -->
	<OptionState Id="PPTFiles" State="Local" />
		<OptionState Id="OrgChartFiles" State="Absent" Children="force" />
		<OptionState Id="PowerPoint_PIA" State="Absent" Children="force" />
		<OptionState Id="PPTSoundFiles" State="Absent" Children="force" />
			
	<!-- Publisher niet installeren.  -->
	<OptionState Id="PubPrimary" State="Absent" Children="force" />
		
	<!-- Gedeelde onderdelen van Office  -->
	<OptionState Id="SHAREDFiles" State="Local" />
		<OptionState Id="ConvertersFiltersFile" State="Local" />
			<OptionState Id="GraphicsFiltersFile" State="Local" />
				<OptionState Id="GraphicsFiltersEPSFiles" State="Local" />
				<OptionState Id="GraphicsFiltersGIFFiles" State="Local" />
				<OptionState Id="GraphicsFiltersJPEGFiles" State="Local" />
				<OptionState Id="GraphicsFiltersPICTFiles" State="Absent" Children="force" />
				<OptionState Id="GraphicsFiltersPNGFiles" State="Local" />
				<OptionState Id="GraphicsFiltersWPGFiles" State="Absent" Children="force" />
			<OptionState Id="TextConverters" State="Local" />
				<OptionState Id="TCRecoverFiles" State="Local" />
				<OptionState Id="TCWP5Files" State="Absent" Children="force" />
				<OptionState Id="TCWP6Files" State="Absent" Children="force" />
			<OptionState Id="WordConverter12Files" State="Local" />
		<OptionState Id="InternationalSupportFiles" State="Local" />
			<OptionState Id="InternationalSupportFiles_JPN" State="Absent" Children="force" />
		<OptionState Id="OArt_DocTheme" State="Absent" Children="force" />
		<OptionState Id="OfficeDigitalSFiles" State="Local" />
		<OptionState Id="ProofingTools" State="Local" />
			<OptionState Id="ProofingTools_3082" State="Absent" Children="force" />
				<OptionState Id="TranslationCore" State="Absent" Children="force" />
			<OptionState Id="ProofingTools_1031" State="Absent" Children="force" />
				<OptionState Id="FindAllWordFormsFiles_1031" State="Absent" Children="force" />
				<OptionState Id="HyphenationFiles_1031" State="Absent" Children="force" />
				<OptionState Id="OCR_1031" State="Absent" Children="force" />
				<OptionState Id="SpellingAndGrammarFiles_1031" State="Absent" Children="force" />
				<OptionState Id="ThesaurusFiles_1031" State="Absent" Children="force" />
				<OptionState Id="TranslationFiles_1031" State="Absent" Children="force" />
			<OptionState Id="ProofingTools_1033" State="Absent" Children="force" />
				<OptionState Id="FindAllWordFormsFiles_1033" State="Absent" Children="force" />
				<OptionState Id="HyphenationFiles_1033" State="Absent" Children="force" />
				<OptionState Id="OCR_1033" State="Absent" Children="force" />
				<OptionState Id="SpellingAndGrammarFiles_1033" State="Absent" Children="force" />
				<OptionState Id="ThesaurusFiles_1033" State="Absent" Children="force" />
			<OptionState Id="ProofingTools_1036" State="Absent" Children="force" />
				<OptionState Id="FindAllWordFormsFiles_1036" State="Absent" Children="force" />
				<OptionState Id="HyphenationFiles_1036" State="Absent" Children="force" />
				<OptionState Id="OCR_1036" State="Absent" Children="force" />
				<OptionState Id="SpellingAndGrammarFiles_1036" State="Absent" Children="force" />
				<OptionState Id="ThesaurusFiles_1036" State="Absent" Children="force" />
				<OptionState Id="TranslationFiles_1036" State="Absent" Children="force" />
			<OptionState Id="ProofingTools_1043" State="Local" />
				<OptionState Id="HyphenationFiles_1043" State="Local" />
				<OptionState Id="OCR_1043" State="Absent" Children="force" />
				<OptionState Id="SpellingAndGrammarFiles_1043" State="Local" />
				<OptionState Id="ThesaurusFiles_1043" State="Local" />
		<OptionState Id="PubFontsSys" State="Local" />
			<OptionState Id="PubFontsBalanceSys" State="Local" />
		<OptionState Id="TCDRegistration" State="Absent" Children="force" />
		<OptionState Id="THEMESFiles" State="Absent" Children="force" />
			<OptionState Id="ThemesAdditionalFiles" State="Absent" Children="force" />
			<OptionState Id="ThemesTypicalFiles" State="Absent" Children="force" />
		<OptionState Id="VBAFiles" State="Local" />
	<!-- Nog meer crap:		
			<Option Id="VSTO" DefaultState="Local" DisallowAbsent="no" DisallowAdvertise="yes" Hidden="yes">
				<Option Id="VSTOCLR35" DefaultState="Local" DisallowAbsent="no" DisallowAdvertise="no" PreReq="NetFW35FULLONLY" Hidden="yes"/>
				<Option Id="VSTOCLR40" DefaultState="Local" DisallowAbsent="no" DisallowAdvertise="no" PreReq="NetFW40" Hidden="yes">
			<Option Id="ScreenRecorderFiles" DefaultState="Absent" DisallowAbsent="no" DisallowAdvertise="yes" Hidden="yes">		-->
		
	<!-- Office hulpprogramma's  -->
	<OptionState Id="TOOLSFiles" State="Absent" Children="force" />
		<OptionState Id="Forms_PIA" State="Absent" Children="force" />
		<OptionState Id="GRAPHFiles" State="Absent" Children="force" />
				<OptionState Id="Graph_PIA" State="Absent" Children="force" />
		<OptionState Id="OsmSKUMain" State="Absent" Children="force" />
			<OptionState Id="OsmSKUAdminUX" State="Absent" Children="force" />
			<OptionState Id="OsmSKUClientUX" State="Absent" Children="force" />
		<OptionState Id="DocumentImagingUtils" State="Absent" Children="force" />
		<OptionState Id="MSTagPluginsFiles" State="Absent" Children="force" />
			<OptionState Id="MetricConverter" State="Absent" Children="force" />
			<OptionState Id="MSTagPluginBiblioFiles" State="Absent" Children="force" />
			<OptionState Id="MSTagPluginDateFiles" State="Absent" Children="force" />
			<OptionState Id="MSTagPluginIMContactFiles" State="Absent" Children="force" />
			<OptionState Id="MSTagPluginNamesFiles" State="Absent" Children="force" />
		<OptionState Id="OSESupp" State="Absent" Children="force" />
			<OptionState Id="LISTFiles" State="Absent" Children="force" />
			<OptionState Id="WebDiscussFiles" State="Absent" Children="force" />
		<OptionState Id="QueryFiles" State="Absent" Children="force" />
		<OptionState Id="SetLanguageFiles" State="Absent" Children="force" />
		<OptionState Id="SmartTag_PIA" State="Absent" Children="force" />
		<OptionState Id="EquationEditorFiles" State="Absent" Children="force" />
		
	<!-- Word wel installeren, maar die .net, paginaranden, en templates zijn niet nodig.  -->
	<OptionState Id="WORDFiles" State="Local" />
		<OptionState Id="Word_PIA" State="Absent" Children="force" />
		<OptionState Id="WORDBordersFiles" State="Absent" Children="force" />
		<OptionState Id="WordQuickFormatsFiles" State="Absent" Children="force" />
	</Configuration>
This has been working without a hitch for over a year now. It installs office 2016 standard with a few options: 64-bit or forced 32-bit (for coexistence with old office 2007 shite), install outlook, onenote, publisher yes or no. The xml file gets patched for these last options.
KMS activation and policy settings are in the update script.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
Thomas_H
Beiträge: 521
Registriert: 09 Jun 2010, 11:57
Wohnort: Havelland

Re: Office 2016 Paket

Beitrag von Thomas_H »

Moinsens,

ich muss dieses Thread leider nochmals öffnen, weil ich offensichtlich zu dusslich bin, den Fehler zu finden.

Gleiche Voraussetzungen, ich benutze das Script von Dominik Daehn.

Das Script läuft einwandfrei bis "winbatch_install" ab hier funktioniert es nicht mehr. Hier heisst es in der setup.opsiscript:

Code: Alles auswählen

[Winbatch_install]
"%ScriptPath%\$OfficeArchitecture$\setup.exe" /config "$LogDir$\config.xml"
Das config.xml wird einwandfrei erstellt, dass die "<configuration>" geschlossen wird, habe ich eingefügt. Somit ist sichergestellt, dass die config.xml korrekt ist.

Wenn ich in einem Eingabefenster mich direkt mit opsi_depot_rw verbinde und dann

Code: Alles auswählen

p:\office2016\setup.exe /config c:\temp\config.xml
ausführe, dann wird Office 2016 wunschgemäß mit den Komponenten installiert. Da ich nur die Setup.exe's kopiert habe, wird in diesem Fall das Office heruntergeladen.

Ich bin wohl zu blöd den Fehler zu sehen. Kann mir mal einer eine Brille leihen? :shock:

Gruß Thomas H
Kennst Du schon die WIKI für OPSI-Scripte? Fertige Installationsscripte bekommen und ablegen unter OPSI-Wiki
Aus dem Glashaus :) : UIB bietet auch Schulungen und Supportverträge für Opsi an.
Bild
Antworten