v1.13 — Post-install activation, app launch, scrollable progress page
- Progress page now scrollable (activation + launch cards were clipped)
- Post-install activation card if no product key was provided during wizard
- App launch buttons (Word, Excel, PowerPoint, Outlook) after successful install
- Skipped apps not shown in launch buttons
- Install time hint: "akár 30-40 percet is igénybe vehet"
- Auto-refresh office list after removal
- MSI uninstall: only valid {GUID} product codes accepted
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
<Company>InstaSoft Zrt.</Company>
|
||||
<Product>InstaSoft Office Tool</Product>
|
||||
<Copyright>Copyright (c) InstaSoft Zrt. 2026</Copyright>
|
||||
<Version>1.1.1</Version>
|
||||
<AssemblyVersion>1.1.1.0</AssemblyVersion>
|
||||
<FileVersion>1.1.1.0</FileVersion>
|
||||
<Version>1.1.3</Version>
|
||||
<AssemblyVersion>1.1.3.0</AssemblyVersion>
|
||||
<FileVersion>1.1.3.0</FileVersion>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
Foreground="{StaticResource TextSecondaryBrush}" Margin="0,-2,0,0"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
<TextBlock Text="v1.11" HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
<TextBlock Text="v1.13" HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -3,18 +3,13 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Background="Transparent">
|
||||
|
||||
<Grid Margin="40,30">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" Margin="40,30">
|
||||
<StackPanel>
|
||||
|
||||
<TextBlock x:Name="TitleText" Grid.Row="0" Text="Telepítés folyamatban..."
|
||||
<TextBlock x:Name="TitleText" Text="Telepítés folyamatban..."
|
||||
FontSize="24" FontWeight="Light" Margin="0,0,0,20"/>
|
||||
|
||||
<StackPanel Grid.Row="1" Margin="0,0,0,16">
|
||||
<StackPanel Margin="0,0,0,16">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||||
<TextBlock x:Name="Step1Icon" Text="" FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14" Foreground="{StaticResource TextSecondaryBrush}" Width="24"/>
|
||||
@@ -30,15 +25,15 @@
|
||||
<StackPanel Orientation="Horizontal" Margin="0,4">
|
||||
<TextBlock x:Name="Step3Icon" Text="" FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14" Foreground="{StaticResource TextSecondaryBrush}" Width="24"/>
|
||||
<TextBlock x:Name="Step3Text" Text="Office telepítése..."
|
||||
<TextBlock x:Name="Step3Text" Text="Office telepítése... (akár 30-40 percet is igénybe vehet)"
|
||||
Foreground="{StaticResource TextSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<ProgressBar x:Name="MainProgress" Grid.Row="1" Style="{StaticResource FluentProgressBar}"
|
||||
IsIndeterminate="True" Margin="0,80,0,0"/>
|
||||
<ProgressBar x:Name="MainProgress" Style="{StaticResource FluentProgressBar}"
|
||||
IsIndeterminate="True" Margin="0,0,0,0"/>
|
||||
|
||||
<Border Grid.Row="2" Background="#F8F8F8" CornerRadius="6" Padding="12" Margin="0,12,0,0"
|
||||
<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"
|
||||
TextWrapping="Wrap" Foreground="{StaticResource TextSecondaryBrush}"
|
||||
@@ -46,11 +41,47 @@
|
||||
VerticalScrollBarVisibility="Auto" AcceptsReturn="True"/>
|
||||
</Border>
|
||||
|
||||
<StackPanel x:Name="DonePanel" Grid.Row="3" Margin="0,12,0,0" Visibility="Collapsed"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock x:Name="DoneIcon" FontFamily="Segoe MDL2 Assets" FontSize="20"
|
||||
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<TextBlock x:Name="DoneText" FontSize="15" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||
<!-- Done panel -->
|
||||
<StackPanel x:Name="DonePanel" Margin="0,12,0,0" Visibility="Collapsed">
|
||||
<!-- Status message -->
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,12">
|
||||
<TextBlock x:Name="DoneIcon" FontFamily="Segoe MDL2 Assets" FontSize="20"
|
||||
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
||||
<TextBlock x:Name="DoneText" FontSize="15" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Activate card (only if no key was provided) -->
|
||||
<Border x:Name="ActivateCard" Visibility="Collapsed"
|
||||
Background="{StaticResource CardBrush}" CornerRadius="8"
|
||||
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1"
|
||||
Padding="16,12" Margin="0,0,0,12">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<TextBlock Text="Termékkulcs megadása" FontSize="14" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="Az Office aktiválásához adja meg a termékkulcsot."
|
||||
FontSize="12" Foreground="{StaticResource TextSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
<Button x:Name="BtnActivateNow" Grid.Column="1" Content="Aktiválás"
|
||||
Style="{StaticResource PrimaryButton}" Click="BtnActivateNow_Click"
|
||||
VerticalAlignment="Center" Padding="18,8"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Launch apps -->
|
||||
<Border x:Name="LaunchCard" Visibility="Collapsed"
|
||||
Background="{StaticResource CardBrush}" CornerRadius="8"
|
||||
BorderBrush="{StaticResource BorderBrush}" BorderThickness="1"
|
||||
Padding="16,12" Margin="0,0,0,8">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Alkalmazás indítása" FontSize="14" FontWeight="SemiBold" Margin="0,0,0,10"/>
|
||||
<WrapPanel x:Name="LaunchButtons" Orientation="Horizontal"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Page>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -133,8 +134,130 @@ namespace InstaSoftOfficeTool.Pages
|
||||
DoneText.Foreground = DoneIcon.Foreground;
|
||||
DonePanel.Visibility = Visibility.Visible;
|
||||
|
||||
if (success)
|
||||
{
|
||||
// Show activate card if no product key was provided
|
||||
if (string.IsNullOrEmpty(_config.ProductKey))
|
||||
{
|
||||
ActivateCard.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
// Show launch buttons
|
||||
BuildLaunchButtons();
|
||||
LaunchCard.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
_main.ShowCloseButton();
|
||||
});
|
||||
}
|
||||
|
||||
private void BuildLaunchButtons()
|
||||
{
|
||||
LaunchButtons.Children.Clear();
|
||||
|
||||
var apps = new[]
|
||||
{
|
||||
("Word", "WINWORD.EXE"),
|
||||
("Excel", "EXCEL.EXE"),
|
||||
("PowerPoint", "POWERPNT.EXE"),
|
||||
("Outlook", "OUTLOOK.EXE"),
|
||||
};
|
||||
|
||||
foreach (var (name, exe) in apps)
|
||||
{
|
||||
// Skip if excluded
|
||||
if (_config.ExcludedApps.Contains(name == "Word" ? "Word" :
|
||||
name == "Excel" ? "Excel" :
|
||||
name == "PowerPoint" ? "PowerPoint" :
|
||||
name == "Outlook" ? "Outlook" : ""))
|
||||
continue;
|
||||
|
||||
var btn = new Button
|
||||
{
|
||||
Content = name,
|
||||
Style = (Style)FindResource("SecondaryButton"),
|
||||
Padding = new Thickness(18, 8, 18, 8),
|
||||
FontSize = 13,
|
||||
Margin = new Thickness(0, 0, 8, 0),
|
||||
Tag = exe
|
||||
};
|
||||
btn.Click += LaunchApp_Click;
|
||||
LaunchButtons.Children.Add(btn);
|
||||
}
|
||||
}
|
||||
|
||||
private void LaunchApp_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var btn = (Button)sender;
|
||||
var exe = (string)btn.Tag;
|
||||
|
||||
try
|
||||
{
|
||||
// Try common Office paths
|
||||
var paths = new[]
|
||||
{
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
|
||||
"Microsoft Office", "root", "Office16", exe),
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
|
||||
"Microsoft Office", "root", "Office16", exe),
|
||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
|
||||
"Microsoft Office", "Office16", exe),
|
||||
};
|
||||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
Process.Start(path);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback: let Windows find it
|
||||
Process.Start(exe);
|
||||
}
|
||||
catch
|
||||
{
|
||||
AppendLog("Nem siker\u00fclt elind\u00edtani: " + exe);
|
||||
}
|
||||
}
|
||||
|
||||
private async void BtnActivateNow_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
string key = await _main.AskProductKeyAsync();
|
||||
if (string.IsNullOrEmpty(key)) return;
|
||||
|
||||
BtnActivateNow.IsEnabled = false;
|
||||
BtnActivateNow.Content = "Aktiv\u00e1l\u00e1s...";
|
||||
|
||||
var lm = new LicenseManager();
|
||||
if (!lm.FindOspp())
|
||||
{
|
||||
AppendLog("Az ospp.vbs nem tal\u00e1lhat\u00f3.");
|
||||
BtnActivateNow.IsEnabled = true;
|
||||
BtnActivateNow.Content = "Aktiv\u00e1l\u00e1s";
|
||||
return;
|
||||
}
|
||||
|
||||
AppendLog("Term\u00e9kkulcs telep\u00edt\u00e9se: " + key);
|
||||
string inpResult = await lm.InstallKeyAsync(key);
|
||||
AppendLog(inpResult);
|
||||
|
||||
AppendLog("Aktiv\u00e1l\u00e1s...");
|
||||
string actResult = await lm.ActivateAsync();
|
||||
AppendLog(actResult);
|
||||
|
||||
if (actResult.Contains("successful") || actResult.Contains("sikeres"))
|
||||
{
|
||||
BtnActivateNow.Content = "Aktiv\u00e1lva \u2713";
|
||||
AppendLog("Az Office sikeresen aktiv\u00e1lva!");
|
||||
}
|
||||
else
|
||||
{
|
||||
BtnActivateNow.IsEnabled = true;
|
||||
BtnActivateNow.Content = "Aktiv\u00e1l\u00e1s";
|
||||
AppendLog("Az aktiv\u00e1l\u00e1s eredm\u00e9ny\u00e9t ellen\u0151rizze a kimenetben.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user