From ae4d7f82bc0d1e0516210c4ef359c96baa70ef70 Mon Sep 17 00:00:00 2001 From: hariel1985 Date: Wed, 1 Apr 2026 17:58:15 +0200 Subject: [PATCH] =?UTF-8?q?v1.15=20=E2=80=94=20PowerShell=20edition=20+=20?= =?UTF-8?q?repo=20restructure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New powershell/InstaSoftOfficeTool.ps1: single-file WPF GUI version - Same Fluent Design UI, no compilation needed - Runs on any Windows 7+ with PowerShell 5.1 (built-in) - Chrome won't flag .ps1 files as "rarely downloaded" - Auto-elevates to admin - Moved C# source to src/ subfolder - Updated .gitignore for nested bin/obj folders Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 4 +- powershell/InstaSoftOfficeTool.ps1 | 1155 +++++++++++++++++ App.xaml => src/App.xaml | 0 App.xaml.cs => src/App.xaml.cs | 0 .../InstaSoftOfficeTool.csproj | 6 +- MainWindow.xaml => src/MainWindow.xaml | 2 +- MainWindow.xaml.cs => src/MainWindow.xaml.cs | 0 {Models => src/Models}/InstallConfig.cs | 0 {Models => src/Models}/InstalledOffice.cs | 0 {Models => src/Models}/OfficeEdition.cs | 0 {Models => src/Models}/OfficeVersion.cs | 0 {Pages => src/Pages}/ConfigPage.xaml | 0 {Pages => src/Pages}/ConfigPage.xaml.cs | 0 {Pages => src/Pages}/ConfirmDialog.xaml | 0 {Pages => src/Pages}/ConfirmDialog.xaml.cs | 0 {Pages => src/Pages}/EditionPage.xaml | 0 {Pages => src/Pages}/EditionPage.xaml.cs | 0 {Pages => src/Pages}/PreInstallCheckPage.xaml | 0 .../Pages}/PreInstallCheckPage.xaml.cs | 0 {Pages => src/Pages}/ProductKeyDialog.xaml | 0 {Pages => src/Pages}/ProductKeyDialog.xaml.cs | 0 {Pages => src/Pages}/ProductKeyPage.xaml | 0 {Pages => src/Pages}/ProductKeyPage.xaml.cs | 0 {Pages => src/Pages}/ProgressPage.xaml | 0 {Pages => src/Pages}/ProgressPage.xaml.cs | 0 {Pages => src/Pages}/RemovePage.xaml | 0 {Pages => src/Pages}/RemovePage.xaml.cs | 0 {Pages => src/Pages}/SummaryPage.xaml | 0 {Pages => src/Pages}/SummaryPage.xaml.cs | 0 {Pages => src/Pages}/TroubleshootPage.xaml | 0 {Pages => src/Pages}/TroubleshootPage.xaml.cs | 0 {Pages => src/Pages}/VersionPage.xaml | 0 {Pages => src/Pages}/VersionPage.xaml.cs | 0 {Pages => src/Pages}/WelcomePage.xaml | 0 {Pages => src/Pages}/WelcomePage.xaml.cs | 0 {Resources => src/Resources}/app.ico | Bin {Services => src/Services}/LicenseManager.cs | 0 {Services => src/Services}/OdtDownloader.cs | 0 {Services => src/Services}/OdtXmlGenerator.cs | 0 {Services => src/Services}/OfficeDetector.cs | 0 {Services => src/Services}/ProcessRunner.cs | 0 {Styles => src/Styles}/ButtonStyles.xaml | 0 {Styles => src/Styles}/ControlStyles.xaml | 0 {Styles => src/Styles}/FluentTheme.xaml | 0 app.manifest => src/app.manifest | 0 45 files changed, 1161 insertions(+), 6 deletions(-) create mode 100644 powershell/InstaSoftOfficeTool.ps1 rename App.xaml => src/App.xaml (100%) rename App.xaml.cs => src/App.xaml.cs (100%) rename InstaSoftOfficeTool.csproj => src/InstaSoftOfficeTool.csproj (88%) rename MainWindow.xaml => src/MainWindow.xaml (98%) rename MainWindow.xaml.cs => src/MainWindow.xaml.cs (100%) rename {Models => src/Models}/InstallConfig.cs (100%) rename {Models => src/Models}/InstalledOffice.cs (100%) rename {Models => src/Models}/OfficeEdition.cs (100%) rename {Models => src/Models}/OfficeVersion.cs (100%) rename {Pages => src/Pages}/ConfigPage.xaml (100%) rename {Pages => src/Pages}/ConfigPage.xaml.cs (100%) rename {Pages => src/Pages}/ConfirmDialog.xaml (100%) rename {Pages => src/Pages}/ConfirmDialog.xaml.cs (100%) rename {Pages => src/Pages}/EditionPage.xaml (100%) rename {Pages => src/Pages}/EditionPage.xaml.cs (100%) rename {Pages => src/Pages}/PreInstallCheckPage.xaml (100%) rename {Pages => src/Pages}/PreInstallCheckPage.xaml.cs (100%) rename {Pages => src/Pages}/ProductKeyDialog.xaml (100%) rename {Pages => src/Pages}/ProductKeyDialog.xaml.cs (100%) rename {Pages => src/Pages}/ProductKeyPage.xaml (100%) rename {Pages => src/Pages}/ProductKeyPage.xaml.cs (100%) rename {Pages => src/Pages}/ProgressPage.xaml (100%) rename {Pages => src/Pages}/ProgressPage.xaml.cs (100%) rename {Pages => src/Pages}/RemovePage.xaml (100%) rename {Pages => src/Pages}/RemovePage.xaml.cs (100%) rename {Pages => src/Pages}/SummaryPage.xaml (100%) rename {Pages => src/Pages}/SummaryPage.xaml.cs (100%) rename {Pages => src/Pages}/TroubleshootPage.xaml (100%) rename {Pages => src/Pages}/TroubleshootPage.xaml.cs (100%) rename {Pages => src/Pages}/VersionPage.xaml (100%) rename {Pages => src/Pages}/VersionPage.xaml.cs (100%) rename {Pages => src/Pages}/WelcomePage.xaml (100%) rename {Pages => src/Pages}/WelcomePage.xaml.cs (100%) rename {Resources => src/Resources}/app.ico (100%) rename {Services => src/Services}/LicenseManager.cs (100%) rename {Services => src/Services}/OdtDownloader.cs (100%) rename {Services => src/Services}/OdtXmlGenerator.cs (100%) rename {Services => src/Services}/OfficeDetector.cs (100%) rename {Services => src/Services}/ProcessRunner.cs (100%) rename {Styles => src/Styles}/ButtonStyles.xaml (100%) rename {Styles => src/Styles}/ControlStyles.xaml (100%) rename {Styles => src/Styles}/FluentTheme.xaml (100%) rename app.manifest => src/app.manifest (100%) diff --git a/.gitignore b/.gitignore index 81de725..cfa9a93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -bin/ -obj/ +**/bin/ +**/obj/ *.user *.suo .vs/ diff --git a/powershell/InstaSoftOfficeTool.ps1 b/powershell/InstaSoftOfficeTool.ps1 new file mode 100644 index 0000000..a40dc42 --- /dev/null +++ b/powershell/InstaSoftOfficeTool.ps1 @@ -0,0 +1,1155 @@ +#Requires -Version 5.1 +# InstaSoft Office Tool v1.14 — PowerShell Edition +# Copyright (c) InstaSoft Informatikai Zrt. 2026 +# Office deployment wizard: install, remove, license management + +# --- Request admin elevation --- +if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { + Start-Process powershell.exe -ArgumentList "-ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs + exit +} + +Add-Type -AssemblyName PresentationFramework +Add-Type -AssemblyName PresentationCore +Add-Type -AssemblyName WindowsBase +Add-Type -AssemblyName System.Net.Http + +# ============================================================ +# DATA +# ============================================================ +$script:Config = @{ + Version = 'Office2024' + Edition = $null + Architecture = '64' + Language = 'hu-hu' + ProductKey = '' + ExcludedApps = @() +} + +$script:Editions = @{ + Office2024 = @( + @{ DisplayName='Standard'; Description='Alapveto irodai alkalmazasok: Word, Excel, PowerPoint, Outlook, OneNote'; ProductId='Standard2024Volume'; Channel='PerpetualVL2024'; IsVolume=$true }, + @{ DisplayName='Professional Plus'; Description='Teljes csomag: Word, Excel, PowerPoint, Outlook, Access, Publisher, OneNote'; ProductId='ProPlus2024Volume'; Channel='PerpetualVL2024'; IsVolume=$true }, + @{ DisplayName="Otthoni `u{00e9}s kisv`u{00e1}llalati verzi`u{00f3}"; Description="Word, Excel, PowerPoint, Outlook, OneNote `u{2014} v`u{00e1}llalkoz`u{00e1}sokban is haszn`u{00e1}lhat`u{00f3}"; ProductId='HomeBusiness2024Retail'; Channel='Current'; IsVolume=$false } + ) + Office2021 = @( + @{ DisplayName='Standard'; Description='Alapveto irodai alkalmazasok: Word, Excel, PowerPoint, Outlook, OneNote'; ProductId='Standard2021Volume'; Channel='PerpetualVL2021'; IsVolume=$true }, + @{ DisplayName='Professional Plus'; Description='Teljes csomag: Word, Excel, PowerPoint, Outlook, Access, Publisher, OneNote'; ProductId='ProPlus2021Volume'; Channel='PerpetualVL2021'; IsVolume=$true }, + @{ DisplayName="Otthoni `u{00e9}s kisv`u{00e1}llalati verzi`u{00f3}"; Description="Word, Excel, PowerPoint, Outlook, OneNote `u{2014} v`u{00e1}llalkoz`u{00e1}sokban is haszn`u{00e1}lhat`u{00f3}"; ProductId='HomeBusiness2021Retail'; Channel='Current'; IsVolume=$false } + ) + Office2019 = @( + @{ DisplayName='Standard'; Description='Alapveto irodai alkalmazasok: Word, Excel, PowerPoint, Outlook, OneNote'; ProductId='Standard2019Volume'; Channel='PerpetualVL2019'; IsVolume=$true }, + @{ DisplayName='Professional Plus'; Description='Teljes csomag: Word, Excel, PowerPoint, Outlook, Access, Publisher, OneNote, Skype for Business'; ProductId='ProPlus2019Volume'; Channel='PerpetualVL2019'; IsVolume=$true }, + @{ DisplayName="Otthoni `u{00e9}s kisv`u{00e1}llalati verzi`u{00f3}"; Description="Word, Excel, PowerPoint, Outlook, OneNote `u{2014} v`u{00e1}llalkoz`u{00e1}sokban is haszn`u{00e1}lhat`u{00f3}"; ProductId='HomeBusiness2019Retail'; Channel='Current'; IsVolume=$false } + ) +} + +$script:Languages = @( + @('hu-hu','Magyar'), @('en-us','English (US)'), @('de-de','Deutsch'), + @('fr-fr','Fran\u00e7ais'), @('it-it','Italiano'), @('es-es','Espa\u00f1ol'), + @('pt-pt','Portugu\u00eas'), @('nl-nl','Nederlands'), @('pl-pl','Polski'), + @('cs-cz','\u010ce\u0161tina'), @('sk-sk','Sloven\u010dina'), @('ro-ro','Rom\u00e2n\u0103'), + @('hr-hr','Hrvatski'), @('sl-si','Sloven\u0161\u010dina'), @('sr-latn-rs','Srpski'), + @('bg-bg','Bulgarian'), @('uk-ua','Ukrainian'), @('ru-ru','Russian'), + @('tr-tr','T\u00fcrk\u00e7e'), @('ja-jp','Japanese'), @('zh-cn','Chinese'), @('ko-kr','Korean') +) + +$script:ExcludableApps = @( + @{Id='Word'; Name='Word'; Default=$true; Min='all'}, + @{Id='Excel'; Name='Excel'; Default=$true; Min='all'}, + @{Id='PowerPoint'; Name='PowerPoint'; Default=$true; Min='all'}, + @{Id='Outlook'; Name='Outlook'; Default=$true; Min='all'}, + @{Id='OneNote'; Name='OneNote'; Default=$true; Min='all'}, + @{Id='Access'; Name='Access'; Default=$true; Min='proplus'}, + @{Id='Publisher'; Name='Publisher'; Default=$true; Min='standard+'}, + @{Id='Teams'; Name='Teams'; Default=$false; Min='all'}, + @{Id='Lync'; Name='Skype for Business'; Default=$false; Min='all'} +) + +# ============================================================ +# XAML — Full UI in one window with panels +# ============================================================ +[xml]$xaml = @' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +