diff --git a/Sources/Winget-AutoUpdate/WAU-Installer-GUI.ps1 b/Sources/Winget-AutoUpdate/WAU-Installer-GUI.ps1
new file mode 100644
index 0000000..c485166
--- /dev/null
+++ b/Sources/Winget-AutoUpdate/WAU-Installer-GUI.ps1
@@ -0,0 +1,395 @@
+# import Appx module if the powershell version is 7/core
+if ( $psversionTable.PSEdition -eq "core" ) {
+ import-Module -name Appx -UseWIndowsPowershell -WarningAction:SilentlyContinue
+}
+
+#Get the Working Dir
+$Script:WorkingDir = $PSScriptRoot
+
+
+<# FUNCTIONS #>
+. "$WorkingDir\functions\Get-WingetCmd.ps1"
+
+#Function to start or update popup
+Function Start-PopUp ($Message) {
+
+ if (!$PopUpWindow) {
+
+ #Create window
+ $inputXML = @"
+
+
+
+
+
+"@
+
+ [xml]$XAML = ($inputXML -replace "x:N", "N")
+
+ #Read the form
+ $Reader = (New-Object System.Xml.XmlNodeReader $XAML)
+ $Script:PopUpWindow = [Windows.Markup.XamlReader]::Load($Reader)
+ $PopUpWindow.Icon = $IconBase64
+
+ #Store Form Objects In PowerShell
+ $XAML.SelectNodes("//*[@Name]") | ForEach-Object {
+ Set-Variable -Name "$($_.Name)" -Value $PopUpWindow.FindName($_.Name) -Scope Script
+ }
+
+ $PopUpWindow.Show()
+ }
+ #Message to display
+ $PopUpLabel.Text = $Message
+ #Update PopUp
+ $PopUpWindow.Dispatcher.Invoke([action] {}, "Render")
+}
+
+#Function to close popup
+Function Close-PopUp {
+ $Script:PopUpWindow.Close()
+ $Script:PopUpWindow = $null
+}
+
+function Get-WingetAppInfo ($SearchApp) {
+ class Software {
+ [string]$Name
+ [string]$Id
+ }
+
+ #Search for winget apps
+ $AppResult = & $Winget search $SearchApp --accept-source-agreements --source winget | Out-String
+
+ #Start Conversion of winget format to an array. Check if "-----" exists
+ if (!($AppResult -match "-----")) {
+ Start-PopUp "No application found!"
+ Start-Sleep 2
+ Close-PopUp
+ return
+ }
+
+ #Split winget output to lines
+ $lines = $AppResult.Split([Environment]::NewLine) | Where-Object { $_ }
+
+ # Find the line that starts with "------"
+ $fl = 0
+ while (-not $lines[$fl].StartsWith("-----")) {
+ $fl++
+ }
+
+ $fl = $fl - 1
+
+ #Get header titles [without remove separator]
+ $index = $lines[$fl] -split '(?<=\s)(?!\s)'
+
+ # Line $fl has the header, we can find char where we find ID and Version [and manage non latin characters]
+ $idStart = $($index[0] -replace '[\u4e00-\u9fa5]', '**').Length
+ $versionStart = $idStart + $($index[1] -replace '[\u4e00-\u9fa5]', '**').Length
+
+ # Now cycle in real package and split accordingly
+ $searchList = @()
+ For ($i = $fl + 2; $i -le $lines.Length; $i++) {
+ $line = $lines[$i] -replace "[\u2026]", " " #Fix "..." in long names
+ # If line contains an ID (Alphanumeric | Literal "." | Alphanumeric)
+ if ($line -match "\w\.\w") {
+ $software = [Software]::new()
+ #Manage non latin characters
+ $nameDeclination = $($line.Substring(0, $idStart) -replace '[\u4e00-\u9fa5]', '**').Length - $line.Substring(0, $idStart).Length
+ $software.Name = $line.Substring(0, $idStart - $nameDeclination).TrimEnd()
+ $software.Id = $line.Substring($idStart - $nameDeclination, $versionStart - $idStart).TrimEnd()
+ #add formatted soft to list
+ $searchList += $software
+ }
+ }
+ return $searchList
+}
+
+function Get-WingetInstalledApps {
+
+ #Json File where to export install apps
+ $jsonFile = "$env:TEMP\Installed_Apps.json"
+
+ #Get list of installed Winget apps to json file
+ & $Winget export -o $jsonFile --accept-source-agreements | Out-Null
+
+ #Convert from json file
+ $InstalledApps = get-content $jsonFile | ConvertFrom-Json
+
+ #Return app list
+ return $InstalledApps.Sources.Packages.PackageIdentifier | Sort-Object | Get-Unique
+}
+
+function Start-Installations ($AppsToInstall) {
+
+ #Run Winget-Install script
+ Start-PopUp "Installing applications..."
+ $WAUInstallPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate\" -Name InstallLocation
+
+ #Try with admin rights.
+ try {
+ Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File ""$WAUInstallPath\Winget-Install.ps1"" -AppIDs ""$AppsToInstall""" -Wait -Verb RunAs
+ }
+ catch {
+ Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File ""$WAUInstallPath\Winget-Install.ps1"" -AppIDs ""$AppsToInstall""" -Wait
+ }
+
+ #Installs finished
+ Start-PopUp "Done!"
+ Start-Sleep 2
+ #Close Popup
+ Close-PopUp
+}
+
+function Start-Uninstallations ($AppsToUninstall) {
+ #Run Winget-Install script
+ Start-PopUp "Uninstalling applications..."
+ $WAUInstallPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate\" -Name InstallLocation
+
+ #Run Winget-Install -Uninstall
+ Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File ""$WAUInstallPath\Winget-Install.ps1"" -AppIDs ""$AppsToUninstall"" -Uninstall" -Wait -Verb RunAs
+
+ Close-PopUp
+}
+
+function Start-InstallGUI {
+
+ ### FORM CREATION ###
+
+ # GUI XAML file
+ $inputXML = @"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ More info about WAU
+
+
+
+"@
+
+ #Create window
+ [xml]$XAML = ($inputXML -replace "x:N", "N")
+
+ #Read the form
+ $Reader = (New-Object System.Xml.XmlNodeReader $xaml)
+ $script:WAUAppInstallerGUI = [Windows.Markup.XamlReader]::Load($reader)
+
+ #Store Form Objects In PowerShell
+ $FormObjects = $xaml.SelectNodes("//*[@Name]")
+ $FormObjects | ForEach-Object {
+ Set-Variable -Name "$($_.Name)" -Value $WAUAppInstallerGUI.FindName($_.Name) -Scope Script
+ }
+
+ # Customization
+ $SaveFileDialog = New-Object System.Windows.Forms.SaveFileDialog
+ $SaveFileDialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
+ $OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog
+ $OpenFileDialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
+ $WAUListOpenFile = New-Object System.Windows.Forms.OpenFileDialog
+ $WAUListOpenFile.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
+ $WAUAppInstallerGUI.Icon = $IconBase64
+
+
+ ### FORM ACTIONS ###
+
+ ##
+ # "Select Apps" Tab
+ ##
+ $SearchButton.add_click(
+ {
+ if ($SearchTextBox.Text) {
+ Start-PopUp "Searching..."
+ $SubmitComboBox.Items.Clear()
+ $List = Get-WingetAppInfo $SearchTextBox.Text
+ foreach ($L in $List) {
+ $SubmitComboBox.Items.Add($L.ID)
+ }
+ $SubmitComboBox.SelectedIndex = 0
+ Close-PopUp
+ }
+ }
+ )
+
+ $SubmitButton.add_click(
+ {
+ $AddAppToList = $SubmitComboBox.Text
+ if ($AddAppToList -ne "" -and $AppListBox.Items -notcontains $AddAppToList) {
+ $AppListBox.Items.Add($AddAppToList)
+ }
+ }
+ )
+
+ $RemoveButton.add_click(
+ {
+ if (!$AppListBox.SelectedItems) {
+ Start-PopUp "Please select apps to remove..."
+ Start-Sleep 2
+ Close-PopUp
+ }
+ while ($AppListBox.SelectedItems) {
+ $AppListBox.Items.Remove($AppListBox.SelectedItems[0])
+ }
+ }
+ )
+
+ $SaveListButton.add_click(
+ {
+ $response = $SaveFileDialog.ShowDialog() # $response can return OK or Cancel
+ if ( $response -eq 'OK' ) {
+ $AppListBox.Items | Out-File $SaveFileDialog.FileName -Append
+ Start-PopUp "File saved to:`n$($SaveFileDialog.FileName)"
+ Start-Sleep 2
+ Close-PopUp
+ }
+ }
+ )
+
+ $OpenListButton.add_click(
+ {
+ $response = $OpenFileDialog.ShowDialog() # $response can return OK or Cancel
+ if ( $response -eq 'OK' ) {
+ $FileContent = Get-Content $OpenFileDialog.FileName
+ foreach ($App in $FileContent) {
+ if ($App -ne "" -and $AppListBox.Items -notcontains $App) {
+ $AppListBox.Items.Add($App)
+ }
+ }
+ }
+ }
+ )
+
+ $InstalledAppButton.add_click(
+ {
+ Start-PopUp "Getting installed apps..."
+ $AppListBox.Items.Clear()
+ $List = Get-WingetInstalledApps
+ foreach ($L in $List) {
+ $AppListBox.Items.Add($L)
+ }
+ Close-PopUp
+ }
+ )
+
+ $UninstallButton.add_click(
+ {
+ if ($AppListBox.SelectedItems) {
+ Start-Uninstallations "$($AppListBox.SelectedItems -join ",")"
+ #$AppListBox.Items.Clear()
+ while ($AppListBox.SelectedItems) {
+ $AppListBox.Items.Remove($AppListBox.SelectedItems[0])
+ }
+ }
+ else {
+ Start-PopUp "Please select apps to uninstall..."
+ Start-Sleep 2
+ Close-PopUp
+ }
+ }
+ )
+
+ $LogButton.add_click(
+ {
+ try {
+ $LogPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate\" -Name InstallLocatifon
+ Start-Process "$LogPath\Logs"
+ }
+ catch {
+ Start-PopUp "Log location not found."
+ Start-Sleep 2
+ Close-PopUp
+ }
+ }
+ )
+
+ ##
+ # Global Form
+ ##
+ $WAUConfiguratorLinkLabel.Add_PreviewMouseDown(
+ {
+ [System.Diagnostics.Process]::Start("https://github.com/Romanitho/Winget-AutoUpdate")
+ }
+ )
+
+ $InstallButton.add_click(
+ {
+ if ($AppListBox.Items) {
+ Start-Installations "$($AppListBox.Items -join ",")"
+ }
+ else {
+ Start-PopUp "Add apps to install."
+ Start-Sleep 2
+ Close-PopUp
+ }
+
+ }
+ )
+
+ $CloseButton.add_click(
+ {
+ $WAUAppInstallerGUI.DialogResult = [System.Windows.Forms.DialogResult]::Cancel
+ $WAUAppInstallerGUI.Close()
+ }
+ )
+
+ # Shows the form
+ $Script:FormReturn = $WAUAppInstallerGUI.ShowDialog()
+}
+
+
+<# MAIN #>
+
+#Load assemblies
+Add-Type -AssemblyName System.Windows.Forms
+Add-Type -AssemblyName System.Drawing
+Add-Type -AssemblyName PresentationFramework
+
+#Pop "Starting..."
+Start-PopUp "Starting..."
+
+#Set config
+$null = cmd /c ''
+[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
+$Script:ProgressPreference = "SilentlyContinue"
+$Script:ErrorActionPreference = "SilentlyContinue"
+$IconBase64 = [Convert]::FromBase64String("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAApDSURBVFhHbVYLcFTVGT7ZR3azr+wru9nsM9m8Q0ISwrM8ROkIojNiddQO1tJ0alB8AaW+KPiWpD4rBQXbkemM2hbnNooFo4CMIgbtiIKBAJIAtkEDCqgMRP36/Wd3A1rvzrf33Hv/83/f/zjnXpWsGq9S1UTNhPbS2p90ldVN7EyPmGSU1082KhqmaFSOPM+oapxqVDedb9Q0X6DPufEPkXsmkDkyV3yIP/rtpP8u8rSTj7wTlEpUjRMRSNaMB2+CD0Ej0BicBE4eBp2BTrM4H1VNBMck+x7ELgfxIRB/4lf8C48gWTmOAirGtnMwfPPHRJwLEZIeMZnP5VlGVOXIjCg9bjhP24htjlDO55JLsMnq8RBuFS8f08WBvpFiJs4VIRAR5woprZ2ISFkLSuvGo7iUZ16fmyURJQKZWYRSzQjGG1GSHp3xX02/hPAkGHS8YkyXiqVHd1KEqJGUZAyzIlJZEamas1HEaRdMNGGIvynTf4ZwapS2yT2XzMTpxxmswqQZV6L1+oWweNLaTkqdqmT09CF8wq2iZS0GB8iJEGWisLRqAuKMIpYegwgjlSgSFeNQQkeXz54LOTZvfR2hZDOinFvdfL4mjleOhTtcC3uwRtvIESWppbCcGRuV4SCEj7yGFkDIRUZEecYgWjYagWgD8qneWzKCqWxGYWQEI2mG2ZHAmMmXQJkjKGI2ZlHQtn+/ixDHXtqovGJ8tGdXll6OE1D5CTh8VYgwAOESlJSOMpT8iYBzEYo3ocBbAaXCuPXOu7WLQ5/sg9lVpgnCqSb4SurpoEVH7WXEgVg9CovroCwRPLp8lZ4DfE18p0c9PdvpLwB3sJoimLUMV0YAoW/IgwAd59kT8Ecb0fefvXry6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E2bXW6Y+zrV/G0viJ0zItxXD6SvTL6lc6jPkFRpOf0ZAZ05ARgRLwdeqhavCZA1ShIMlCbPjx6LkkrtgW9yHwMqPYZr2FEn4zT9vJUZwuXmb2mByjtL9YGJT5heUsLHLhsl+iCxfp2LUXRJ5jlzOUgqbp5TlSMJMRyJElp44t/CdnscPF2Wu5NYrr2e3vi/I4/5gtYVhcyfpoyxH8n84y5fuUjRsF2O5KcQylgyIACsFWLjezY44zHauEEsR+8PHDwsvzGaezX5eCwJs3jAsjpieJ36klPKRI34lE7mxU67PokMyICKyxDmIAK5zRmJ1JfSmo0Vw3ZvtUQ1LQQaZcYxC41qwCJC5NvHjEYigjH8N3s+NKYzbCP+oWNBO4i6ik06MfHfKoMNhWBxxg0SZszOhx1YBrwUsl7YjucESGHbOZzDDII/BZd4pHBy3U4hyeMvU/wCIL/+Sfv0j3gAAAABJRU5ErkJggg==")
+
+#Get WinGet cmd
+$Script:Winget = Get-WingetCmd
+
+#Run WAUConfigurator
+Close-PopUp
+Start-InstallGUI
diff --git a/Sources/Winget-AutoUpdate/Winget-Install.ps1 b/Sources/Winget-AutoUpdate/Winget-Install.ps1
index 5fec755..b8d438a 100644
--- a/Sources/Winget-AutoUpdate/Winget-Install.ps1
+++ b/Sources/Winget-AutoUpdate/Winget-Install.ps1
@@ -368,6 +368,7 @@ else {
if ($Winget) {
#Put apps in an array
$AppIDsArray = $AppIDs -split ","
+ Write-Host ""
#Run install or uninstall for all apps
foreach ($App_Full in $AppIDsArray) {
diff --git a/Sources/Wix/build.wxs b/Sources/Wix/build.wxs
index 7af57ae..bb0f964 100644
--- a/Sources/Wix/build.wxs
+++ b/Sources/Wix/build.wxs
@@ -107,6 +107,10 @@
+
+
+
+
@@ -163,6 +167,10 @@
+
+
+
+
@@ -220,6 +228,9 @@
+
+
+
@@ -268,6 +279,7 @@
+
@@ -336,6 +348,9 @@
+
+
+
@@ -345,6 +360,14 @@
+
+
+
+
+
+
+
+