v1.22 — Office 2016 MSI ISO telepítés támogatás

Office 2016 Standard és Professional Plus telepítése ISO letöltéssel
(soft.direct), ISO csatolással és a Microsoft MSI telepítő indításával.
A 2019/2021/2024 verziók továbbra is ODT-vel működnek.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hariel1985
2026-04-13 23:27:14 +02:00
szülő 813e08b7d4
commit 12b86e0707
12 fájl változott, egészen pontosan 501 új sor hozzáadva és 92 régi sor törölve

Fájl megtekintése

@@ -32,12 +32,22 @@
<TextBlock Text="Telepítési nyelv" FontSize="15" FontWeight="SemiBold" Margin="0,0,0,8"/>
<ComboBox x:Name="CbLanguage" Style="{StaticResource FluentComboBox}"
HorizontalAlignment="Stretch"/>
<TextBlock x:Name="LanguageNote" Visibility="Collapsed"
FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"
Margin="0,4,0,0" TextWrapping="Wrap"/>
</StackPanel>
</Grid>
<TextBlock Text="Telepítendő alkalmazások" FontSize="15" FontWeight="SemiBold" Margin="0,0,0,10"/>
<TextBlock x:Name="ArchNote" Visibility="Collapsed"
FontSize="12" Foreground="#E65100" Margin="0,-12,0,16" TextWrapping="Wrap"/>
<TextBlock x:Name="AppTitle" Text="Telepítendő alkalmazások" FontSize="15" FontWeight="SemiBold" Margin="0,0,0,10"/>
<WrapPanel x:Name="AppCheckBoxes" Orientation="Horizontal"/>
<TextBlock x:Name="AppNote" Visibility="Collapsed"
FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"
Margin="0,8,0,0" TextWrapping="Wrap"/>
</StackPanel>
</ScrollViewer>
</Page>

Fájl megtekintése

@@ -17,12 +17,23 @@ namespace InstaSoftOfficeTool.Pages
_main = main;
_config = config;
bool isMsi = _config.IsMsiInstall;
// Restore arch
if (_config.Architecture == "32")
{
Rb32.IsChecked = true;
}
// MSI: handle architecture constraints
if (isMsi && _config.Edition != null && !_config.Edition.HasArchitecture("32"))
{
Rb32.IsEnabled = false;
Rb64.IsChecked = true;
ArchNote.Text = "A Professional Plus kiadáshoz csak 64-bites telepítő érhető el.";
ArchNote.Visibility = Visibility.Visible;
}
// Populate language combo
foreach (var lang in LanguageList.Languages)
{
@@ -45,37 +56,65 @@ namespace InstaSoftOfficeTool.Pages
}
if (CbLanguage.SelectedIndex < 0) CbLanguage.SelectedIndex = 0;
// Populate app checkboxes
foreach (var app in ExcludableApps.Apps)
// MSI: language is baked into the ISO
if (isMsi)
{
// Ha m\u00e1r van ment\u00e9s a configban, azt haszn\u00e1ljuk; k\u00fcl\u00f6nben a default\u00f6t
bool isChecked = _config.ExcludedApps.Count > 0
? !_config.ExcludedApps.Contains(app.Id)
: app.DefaultChecked;
bool isProPlus = _config.Edition != null &&
_config.Edition.ProductId.Contains("ProPlus");
bool isStandard = _config.Edition != null &&
_config.Edition.ProductId.Contains("Standard");
bool unavailable = false;
if (app.MinEdition == "proplus" && !isProPlus)
unavailable = true;
else if (app.MinEdition == "standard+" && !isProPlus && !isStandard)
unavailable = true;
var cb = new CheckBox
CbLanguage.IsEnabled = false;
// Force Hungarian selection
for (int i = 0; i < CbLanguage.Items.Count; i++)
{
Content = app.DisplayName,
IsChecked = unavailable ? false : isChecked,
IsEnabled = !unavailable,
Tag = app.Id,
Style = (Style)FindResource("FluentCheckBox"),
Margin = new Thickness(0, 4, 24, 4),
MinWidth = 160
};
_appCheckBoxes.Add(cb);
AppCheckBoxes.Children.Add(cb);
var item = (ComboBoxItem)CbLanguage.Items[i];
if ((string)item.Tag == "hu-hu")
{
CbLanguage.SelectedIndex = i;
break;
}
}
LanguageNote.Text = "Az Office 2016 telepítő ISO magyar nyelvű. A nyelv nem módosítható.";
LanguageNote.Visibility = Visibility.Visible;
}
// MSI: app exclusion not available through our tool
if (isMsi)
{
AppTitle.Visibility = Visibility.Collapsed;
AppCheckBoxes.Visibility = Visibility.Collapsed;
AppNote.Text = "Az alkalmazások kiválasztása a Microsoft telepítő felületén lehetséges.";
AppNote.Visibility = Visibility.Visible;
}
else
{
// Populate app checkboxes (ODT mode)
foreach (var app in ExcludableApps.Apps)
{
bool isChecked = _config.ExcludedApps.Count > 0
? !_config.ExcludedApps.Contains(app.Id)
: app.DefaultChecked;
bool isProPlus = _config.Edition != null &&
_config.Edition.ProductId.Contains("ProPlus");
bool isStandard = _config.Edition != null &&
_config.Edition.ProductId.Contains("Standard");
bool unavailable = false;
if (app.MinEdition == "proplus" && !isProPlus)
unavailable = true;
else if (app.MinEdition == "standard+" && !isProPlus && !isStandard)
unavailable = true;
var cb = new CheckBox
{
Content = app.DisplayName,
IsChecked = unavailable ? false : isChecked,
IsEnabled = !unavailable,
Tag = app.Id,
Style = (Style)FindResource("FluentCheckBox"),
Margin = new Thickness(0, 4, 24, 4),
MinWidth = 160
};
_appCheckBoxes.Add(cb);
AppCheckBoxes.Children.Add(cb);
}
}
}

Fájl megtekintése

@@ -33,6 +33,9 @@
<ProgressBar x:Name="MainProgress" Style="{StaticResource FluentProgressBar}"
IsIndeterminate="True" Margin="0,0,0,0"/>
<TextBlock x:Name="DownloadInfo" FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"
Margin="0,4,0,0" Visibility="Collapsed"/>
<Border Background="#F8F8F8" CornerRadius="6" Padding="12" Margin="0,12,0,0"
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1">
<TextBox x:Name="LogText" FontFamily="Consolas" FontSize="11"

Fájl megtekintése

@@ -26,56 +26,179 @@ namespace InstaSoftOfficeTool.Pages
{
try
{
// Step 1: Download ODT
SetStepActive(Step1Icon, Step1Text);
AppendLog("ODT let\u00f6lt\u00e9se indul...");
var downloader = new OdtDownloader();
downloader.StatusChanged += msg => Dispatcher.Invoke(() => AppendLog(msg));
bool downloaded = await downloader.DownloadAndExtractAsync();
if (!downloaded)
if (_config.IsMsiInstall)
{
SetStepError(Step1Icon, Step1Text);
ShowDone(false, "Az ODT let\u00f6lt\u00e9se sikertelen.");
return;
}
SetStepDone(Step1Icon, Step1Text);
// Step 2: Generate config XML
SetStepActive(Step2Icon, Step2Text);
AppendLog("Konfigur\u00e1ci\u00f3s XML gener\u00e1l\u00e1sa...");
string xml = OdtXmlGenerator.Generate(_config);
string xmlPath = Path.Combine(downloader.OdtFolder, "configuration.xml");
File.WriteAllText(xmlPath, xml);
AppendLog("XML mentve: " + xmlPath);
SetStepDone(Step2Icon, Step2Text);
// Step 3: Run setup.exe /configure
SetStepActive(Step3Icon, Step3Text);
AppendLog("Office telep\u00edt\u00e9s ind\u00edt\u00e1sa...");
AppendLog("setup.exe /configure \"" + xmlPath + "\"");
int exitCode = await downloader.RunSetupAsync(xmlPath, msg =>
Dispatcher.Invoke(() => AppendLog(msg)));
if (exitCode == 0)
{
SetStepDone(Step3Icon, Step3Text);
ShowDone(true, "Az Office sikeresen telep\u00fclt!");
await StartMsiInstallation();
}
else
{
SetStepError(Step3Icon, Step3Text);
ShowDone(false, "A telep\u00edt\u00e9s hibak\u00f3ddal fejez\u0151d\u00f6tt be: " + exitCode);
await StartOdtInstallation();
}
}
catch (Exception ex)
{
AppendLog("HIBA: " + ex.Message);
ShowDone(false, "V\u00e1ratlan hiba t\u00f6rt\u00e9nt.");
ShowDone(false, "Váratlan hiba történt.");
}
}
private async Task StartOdtInstallation()
{
// Step 1: Download ODT
SetStepActive(Step1Icon, Step1Text);
AppendLog("ODT letöltése indul...");
var downloader = new OdtDownloader();
downloader.StatusChanged += msg => Dispatcher.Invoke(() => AppendLog(msg));
bool downloaded = await downloader.DownloadAndExtractAsync();
if (!downloaded)
{
SetStepError(Step1Icon, Step1Text);
ShowDone(false, "Az ODT letöltése sikertelen.");
return;
}
SetStepDone(Step1Icon, Step1Text);
// Step 2: Generate config XML
SetStepActive(Step2Icon, Step2Text);
AppendLog("Konfigurációs XML generálása...");
string xml = OdtXmlGenerator.Generate(_config);
string xmlPath = Path.Combine(downloader.OdtFolder, "configuration.xml");
File.WriteAllText(xmlPath, xml);
AppendLog("XML mentve: " + xmlPath);
SetStepDone(Step2Icon, Step2Text);
// Step 3: Run setup.exe /configure
SetStepActive(Step3Icon, Step3Text);
AppendLog("Office telepítés indítása...");
AppendLog("setup.exe /configure \"" + xmlPath + "\"");
int exitCode = await downloader.RunSetupAsync(xmlPath, msg =>
Dispatcher.Invoke(() => AppendLog(msg)));
if (exitCode == 0)
{
SetStepDone(Step3Icon, Step3Text);
ShowDone(true, "Az Office sikeresen települt!");
}
else
{
SetStepError(Step3Icon, Step3Text);
ShowDone(false, "A telepítés hibakóddal fejeződött be: " + exitCode);
}
}
private async Task StartMsiInstallation()
{
string isoUrl = _config.GetIsoUrl();
if (string.IsNullOrEmpty(isoUrl))
{
ShowDone(false, "Nincs elérhető ISO a kiválasztott architektúrához.");
return;
}
// Update step labels for MSI flow
Dispatcher.Invoke(() =>
{
Step1Text.Text = "Telepítő ISO letöltése...";
Step2Text.Text = "ISO csatolása...";
Step3Text.Text = "Office 2016 telepítése...";
});
var installer = new MsiInstaller();
installer.StatusChanged += msg => Dispatcher.Invoke(() => AppendLog(msg));
installer.DownloadProgress += (received, total) =>
{
Dispatcher.Invoke(() =>
{
long receivedMb = received / 1024 / 1024;
if (total > 0)
{
long totalMb = total / 1024 / 1024;
int percent = (int)(received * 100 / total);
DownloadInfo.Text = receivedMb + " MB / " + totalMb + " MB (" + percent + "%)";
MainProgress.IsIndeterminate = false;
MainProgress.Value = percent;
}
else
{
DownloadInfo.Text = receivedMb + " MB letöltve...";
}
DownloadInfo.Visibility = Visibility.Visible;
});
};
// Step 1: Download ISO
SetStepActive(Step1Icon, Step1Text);
AppendLog("ISO letöltése indul...");
bool downloaded = await installer.DownloadIsoAsync(isoUrl);
if (!downloaded)
{
SetStepError(Step1Icon, Step1Text);
ShowDone(false, "Az ISO letöltése sikertelen.");
return;
}
SetStepDone(Step1Icon, Step1Text);
// Hide download progress, reset progress bar
Dispatcher.Invoke(() =>
{
DownloadInfo.Visibility = Visibility.Collapsed;
MainProgress.IsIndeterminate = true;
});
// Step 2: Mount ISO
SetStepActive(Step2Icon, Step2Text);
bool mounted = await installer.MountIsoAsync();
if (!mounted)
{
SetStepError(Step2Icon, Step2Text);
ShowDone(false, "Az ISO csatolása sikertelen.");
return;
}
SetStepDone(Step2Icon, Step2Text);
// Step 3: Run setup.exe
SetStepActive(Step3Icon, Step3Text);
int exitCode = await installer.RunSetupAsync(msg =>
Dispatcher.Invoke(() => AppendLog(msg)));
// Dismount ISO regardless of result
await installer.DismountIsoAsync();
if (exitCode == 0)
{
SetStepDone(Step3Icon, Step3Text);
// Apply product key if provided
if (!string.IsNullOrEmpty(_config.ProductKey))
{
AppendLog("Termékkulcs telepítése...");
var lm = new LicenseManager();
if (lm.FindOspp())
{
string inpResult = await lm.InstallKeyAsync(_config.ProductKey);
AppendLog(inpResult);
AppendLog("Aktiválás...");
string actResult = await lm.ActivateAsync();
AppendLog(actResult);
}
else
{
AppendLog("Az ospp.vbs nem található — a kulcsot később a Licenc-kezelésben adhatja meg.");
}
}
ShowDone(true, "Az Office 2016 sikeresen települt!");
}
else
{
SetStepError(Step3Icon, Step3Text);
ShowDone(false, "A telepítés hibakóddal fejeződött be: " + exitCode);
}
}

Fájl megtekintése

@@ -30,13 +30,30 @@ namespace InstaSoftOfficeTool.Pages
SumLanguage.Text = _config.GetLanguageDisplayName() + " (" + _config.Language + ")";
SumKey.Text = string.IsNullOrEmpty(_config.ProductKey) ? "Nincs megadva" : _config.ProductKey;
if (_config.ExcludedApps.Count > 0)
SumExcluded.Text = string.Join(", ", _config.ExcludedApps);
else
SumExcluded.Text = "Nincs (minden alkalmaz\u00e1s telep\u00fcl)";
if (_config.IsMsiInstall)
{
// MSI mode: no app exclusion, show ISO info instead of XML
SumExcluded.Text = "(a Microsoft telepítőben választható)";
_generatedXml = OdtXmlGenerator.Generate(_config);
XmlPreview.Text = _generatedXml;
string isoUrl = _config.GetIsoUrl();
XmlPreview.Text = "Telepítési mód: ISO letöltés + MSI telepítő\n" +
"ISO URL: " + (isoUrl ?? "Nem elérhető") + "\n\n" +
"A telepítő ISO fájl letöltése után a Microsoft Office\n" +
"saját telepítője indul el automatikusan.";
BtnSaveXml.Visibility = System.Windows.Visibility.Collapsed;
}
else
{
if (_config.ExcludedApps.Count > 0)
SumExcluded.Text = string.Join(", ", _config.ExcludedApps);
else
SumExcluded.Text = "Nincs (minden alkalmazás települ)";
_generatedXml = OdtXmlGenerator.Generate(_config);
XmlPreview.Text = _generatedXml;
BtnSaveXml.Visibility = System.Windows.Visibility.Visible;
}
}
private void BtnSaveXml_Click(object sender, RoutedEventArgs e)

Fájl megtekintése

@@ -15,7 +15,7 @@
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,4,0,0"/>
</StackPanel>
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" Padding="0,0,4,0">
<StackPanel VerticalAlignment="Top">
<RadioButton x:Name="Rb2024" Style="{StaticResource CardRadioButton}"
GroupName="Version" IsChecked="True" Margin="0,0,0,10">