mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Adds support for custom Office configuration XML
Introduces the ability to use a custom XML file for Office installation, allowing for more flexible configurations. The build script now accepts an `OfficeConfigXMLFile` parameter. If provided, its filename will be used for the installation. The Office Deployment Toolkit is now downloaded to the specified Office path instead of the development path. UI tooltips are updated to clarify this behavior.
This commit is contained in:
@@ -277,6 +277,7 @@ param(
|
|||||||
|
|
||||||
[hashtable]$AppsScriptVariables,
|
[hashtable]$AppsScriptVariables,
|
||||||
[bool]$InstallOffice,
|
[bool]$InstallOffice,
|
||||||
|
[string]$OfficeConfigXMLFile,
|
||||||
[ValidateSet('Microsoft', 'Dell', 'HP', 'Lenovo')]
|
[ValidateSet('Microsoft', 'Dell', 'HP', 'Lenovo')]
|
||||||
[string]$Make,
|
[string]$Make,
|
||||||
[string]$Model,
|
[string]$Model,
|
||||||
@@ -1962,9 +1963,15 @@ function Get-ODTURL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Get-Office {
|
function Get-Office {
|
||||||
|
# If a custom Office Config XML is provided via config file, use its filename for the installation.
|
||||||
|
# The UI script is responsible for copying the file itself to the OfficePath.
|
||||||
|
if ((Get-Variable -Name 'OfficeConfigXMLFile' -ErrorAction SilentlyContinue) -and -not([string]::IsNullOrEmpty($OfficeConfigXMLFile))) {
|
||||||
|
$script:OfficeInstallXML = Split-Path -Path $OfficeConfigXMLFile -Leaf
|
||||||
|
WriteLog "A custom Office configuration file was specified. Using '$($script:OfficeInstallXML)' for installation."
|
||||||
|
}
|
||||||
#Download ODT
|
#Download ODT
|
||||||
$ODTUrl = Get-ODTURL
|
$ODTUrl = Get-ODTURL
|
||||||
$ODTInstallFile = "$FFUDevelopmentPath\odtsetup.exe"
|
$ODTInstallFile = "$OfficePath\odtsetup.exe"
|
||||||
WriteLog "Downloading Office Deployment Toolkit from $ODTUrl to $ODTInstallFile"
|
WriteLog "Downloading Office Deployment Toolkit from $ODTUrl to $ODTInstallFile"
|
||||||
$OriginalVerbosePreference = $VerbosePreference
|
$OriginalVerbosePreference = $VerbosePreference
|
||||||
$VerbosePreference = 'SilentlyContinue'
|
$VerbosePreference = 'SilentlyContinue'
|
||||||
|
|||||||
@@ -480,14 +480,14 @@
|
|||||||
<CheckBox x:Name="chkInstallOffice" Content="Install Office" Margin="0,0,5,0" ToolTip="Install Microsoft Office if set to $true. The script will download the latest ODT and Office files in the $FFUDevelopmentPath\Apps\Office folder and install Office in the FFU via VM."/>
|
<CheckBox x:Name="chkInstallOffice" Content="Install Office" Margin="0,0,5,0" ToolTip="Install Microsoft Office if set to $true. The script will download the latest ODT and Office files in the $FFUDevelopmentPath\Apps\Office folder and install Office in the FFU via VM."/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel x:Name="OfficePathStackPanel" Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
|
<StackPanel x:Name="OfficePathStackPanel" Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="0,5">
|
||||||
<TextBlock Text="Office Path" ToolTip="Path to the Office installation files."/>
|
<TextBlock Text="Office Path" ToolTip="Path to the Office directory that contains the DownloadFFU.xml and DeployFFU.xml files. This is where Office will be downloaded to from the ODT."/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid x:Name="OfficePathGrid" Grid.Row="1" Grid.Column="1" Margin="5">
|
<Grid x:Name="OfficePathGrid" Grid.Row="1" Grid.Column="1" Margin="5">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBox x:Name="txtOfficePath" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch" ToolTip="Path to Office installation files."/>
|
<TextBox x:Name="txtOfficePath" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Stretch" ToolTip="Path to the Office directory that contains the DownloadFFU.xml and DeployFFU.xml files. This is where Office will be downloaded to from the ODT."/>
|
||||||
<Button x:Name="btnBrowseOfficePath" Grid.Column="1" Content="Browse..." Width="80" VerticalAlignment="Center"/>
|
<Button x:Name="btnBrowseOfficePath" Grid.Column="1" Content="Browse..." Width="80" VerticalAlignment="Center"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<StackPanel x:Name="CopyOfficeConfigXMLStackPanel" Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
|
<StackPanel x:Name="CopyOfficeConfigXMLStackPanel" Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
|
||||||
|
|||||||
Reference in New Issue
Block a user