diff --git a/winutil.ps1 b/winutil.ps1
index 1fc83807..a0da66a9 100644
--- a/winutil.ps1
+++ b/winutil.ps1
@@ -10,7 +10,7 @@
Author : Chris Titus @christitustech
Runspace Author: @DeveloperDurp
GitHub : https://github.com/ChrisTitusTech
- Version : 24.05.09
+ Version : 24.05.10
#>
param (
[switch]$Debug,
@@ -47,7 +47,7 @@ Add-Type -AssemblyName System.Windows.Forms
# Variable to sync between runspaces
$sync = [Hashtable]::Synchronized(@{})
$sync.PSScriptRoot = $PSScriptRoot
-$sync.version = "24.05.09"
+$sync.version = "24.05.10"
$sync.configs = @{}
$sync.ProcessRunning = $false
@@ -743,21 +743,27 @@ Function Install-WinUtilProgramWinget {
Write-Host "$Program installed successfully with User scope."
continue
}
- Write-Host "Attempt with Unelevated prompt"
- $process = Start-Process -FilePath "powershell" -ArgumentList "-Command Start-Process winget -ArgumentList 'install --id $Program --silent --accept-source-agreements --accept-package-agreements' -Verb runAsUser" -Wait -PassThru
- if($process.ExitCode -eq 0){
- Write-Host "$Program installed successfully with Unelevated prompt."
+ Write-Host "Attempt with User prompt"
+ $userChoice = [System.Windows.MessageBox]::Show("Do you want to attempt $Program installation with specific user credentials? Select 'Yes' to proceed or 'No' to skip.", "User Credential Prompt", [System.Windows.MessageBoxButton]::YesNo)
+ if ($userChoice -eq 'Yes') {
+ $getcreds = Get-Credential
+ $process = Start-Process -FilePath "winget" -ArgumentList "install --id $Program --silent --accept-source-agreements --accept-package-agreements" -Credential $getcreds -PassThru
+ Wait-Process -Id $process.Id
+ $status = $process.ExitCode
+ } else {
+ Write-Host "Skipping installation with specific user credentials."
+ }
+ if($status -eq 0){
+ Write-Host "$Program installed successfully with User prompt."
continue
}
Write-Host "Attempting installation with Chocolatey as a fallback method"
- $chocoStatus = $(Start-Process -FilePath "choco" -ArgumentList "install $Program -y" -Wait -PassThru).ExitCode
- if($chocoStatus -eq 0){
+ $status = $(Start-Process -FilePath "choco" -ArgumentList "install $Program -y" -Wait -PassThru).ExitCode
+ if($status -eq 0){
Write-Host "$Program installed successfully using Chocolatey."
continue
- } else {
- Write-Host "Failed to install $Program using Chocolatey."
}
- Write-Host "Failed to install $Program."
+ Write-Host "Failed to install $Program. You need to install it manually... Sorry!"
} catch {
Write-Host "Failed to install $Program due to an error: $_"
}
@@ -6586,6 +6592,14 @@ $sync.configs.applications = '{
"link": "https://bitsum.com/",
"winget": "BitSum.ProcessLasso"
},
+ "WPFInstallspotify": {
+ "category": "Multimedia Tools",
+ "choco": "spotify",
+ "content": "Spotify",
+ "description": "Spotify is a digital music service that gives you access to millions of songs, podcasts, and videos from artists all over the world.",
+ "link": "https://www.spotify.com/",
+ "winget": "Spotify.Spotify"
+ },
"WPFInstallprocessmonitor": {
"category": "Microsoft Tools",
"choco": "procexp",
@@ -11997,6 +12011,9 @@ $inputXML = '
+
+
+
@@ -12008,15 +12025,15 @@ $inputXML = '
-
-
-
+
+
+
@@ -12207,15 +12224,15 @@ $inputXML = '
-
-
-
+
+
+
diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml
index 69a1dbe7..2b86c7c5 100644
--- a/xaml/inputApp.xaml
+++ b/xaml/inputApp.xaml
@@ -592,6 +592,9 @@
+
+
+
@@ -603,15 +606,15 @@
-
-
-
+
+
+
@@ -802,15 +805,15 @@
-
-
-
+
+
+