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 = @' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +