mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 10:32:35 -05:00
2023 09 23 test (#1117)
* move restore point to runspace (#1056)
* Add Guilded into Communication Tab (#1059)
* Add Guilded into Communication Tab
* Remove Choco Package due to there is no Chocolatey packages
* : Add ZeroTier One to utilities menu (#1061)
* Update applications.json (#1063)
Update to add [SuperF4 - Stefan Sundin](https://stefansundin.github.io/superf4/), as mentioned in #374 [Choco - SuperF4](https://community.chocolatey.org/packages/superf4) maintained by Xav83. [WinGet - SuperF4](https://winstall.app/apps/StefanSundin.Superf4) SuperF4 and Winget package published by Stefan Sundin.
* Update inputXML.xaml (#1062)
Updated inputXML.xaml to account for addition of the SuperF4 software.
* Added AIMP music player (#1064)
* Add Ventoy (Chocolatey Only Package) & .NET Core Runtime (Winget & Chocolatey) (#1066)
* Tidy up SuperF4 line.
* Tidy up SuperF4 line.
Used spaces instead of tabs.
* Add dotnet 7.0.11 Desktop Runtime
* Undone changes to SuperF4 line
* Addition of Ventoy (chocolatey only) package
* Comment Spacing, Indentation, and Capitalization (#1084)
* Comment Spacing, Indentation, and Capitalization
* Comment Grammar and Spacing
Makes grammar in comments better and more consistent
Adds space before comment and centers word in `Write-Host` commands
* More Grammar and Formatting
* Add some comments
* Populate PlaceHolder comments in functions
Files I found that has issues:
Get-WinUtilRegistry.ps1
Install-WinUtilWinget.ps1
Invoke-WinUtilDarkMode.ps1
Remove-WinUtilAPPX.ps1
Test-WinUtilPackageManager.ps1
Update-WinUtilProgramWinget.ps1
Invoke-WPFUpdatessecurity.ps1
* Tweak a few more comments
* Tweak another write-host statement
* Undo Catch statement adjustment
It's outside of the scope of this pull request
* Trim Trailing Whitespace (#1085)
* Trim Trailing Whitespace
* Revert "Trim Trailing Whitespace"
This reverts commit 0ce32aa2c2
.
* Trim Trailing Whitespace, take 2
* Bug Fixes
- Edge Removal pullback to local
- Formatting fixes
* testing refactor to ps1
* Update winget-install to 3.0.1 (#1086)
* Update tweaks.json (#1087)
Capitalized first letter of "path" --> "Path" keys
* Update edgeremoval.ps1
* Update edgeremoval.ps1
* Update edgeremoval.ps1
add error handling
* Update functions.Tests.ps1
* fix catch error
* add MSI Afterburner (#1097)
* Add GitHub stats
* Remove Application Experience
* Thorium addition
* remove sample submission
* testing
* Ultimate Performance
* Home GPEDIT
* Fix Winget Install on New System
---------
Co-authored-by: DeveloperDurp <developerdurp@durp.info>
Co-authored-by: Justawildwolf <62820836+blusewill@users.noreply.github.com>
Co-authored-by: Tim Stone <github@tsdev.au>
Co-authored-by: Will Barnard <5012445+mrwillbarnz@users.noreply.github.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
Co-authored-by: Carter <60557606+Carterpersall@users.noreply.github.com>
Co-authored-by: Yorai Levi <yorai.email@gmail.com>
Co-authored-by: Saikrishnan K <53394202+K-Saikrishnan@users.noreply.github.com>
This commit is contained in:
31
winget.ps1
31
winget.ps1
@ -1,6 +1,6 @@
|
||||
<#PSScriptInfo
|
||||
|
||||
.VERSION 3.0.0
|
||||
.VERSION 3.0.1
|
||||
|
||||
.GUID 3b581edb-5d90-4fa1-ba15-4f2377275463
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
[Version 2.1.0] - Added alternate method/URL for dependencies in case the main URL is down. Fixed licensing issue when winget is installed on Server 2022.
|
||||
[Version 2.1.1] - Switched primary/alternate methods. Added Cleanup function to avoid errors when cleaning up temp files. Added output of URL for alternate method. Suppressed Add-AppxProvisionedPackage output. Improved success message. Improved verbiage. Improve PS script comments. Added check if the URL is empty. Moved display of URL beneath the check.
|
||||
[Version 3.0.0] - Major changes. Added OS version detection checks - detects OS version, release ID, ensures compatibility. Forces older file installation for Server 2022 to avoid issues after installing. Added DebugMode, DisableCleanup, Force. Renamed CheckForUpdates to CheckForUpdate. Improved output. Improved error handling. Improved comments. Improved code readability. Moved CheckForUpdate into function. Added PowerShellGalleryName. Renamed Get-OSVersion to Get-OSInfo. Moved architecture detection into Get-OSInfo. Renamed Get-NewestLink to Get-WingetDownloadUrl. Have Get-WingetDownloadUrl not get preview releases.
|
||||
[Version 3.0.1] - Updated Get-OSInfo function to fix issues when used on non-English systems. Improved error handling of "resources in use" error.
|
||||
|
||||
#>
|
||||
|
||||
@ -56,7 +57,7 @@ This function should be run with administrative privileges.
|
||||
.PARAMETER Help
|
||||
Displays the full help information for the script.
|
||||
.NOTES
|
||||
Version : 3.0.0
|
||||
Version : 3.0.1
|
||||
Created by : asheroto
|
||||
.LINK
|
||||
Project Site: https://github.com/asheroto/winget-install
|
||||
@ -72,7 +73,7 @@ param (
|
||||
)
|
||||
|
||||
# Version
|
||||
$CurrentVersion = '3.0.0'
|
||||
$CurrentVersion = '3.0.1'
|
||||
$RepoOwner = 'asheroto'
|
||||
$RepoName = 'winget-install'
|
||||
$PowerShellGalleryName = 'winget-install'
|
||||
@ -158,12 +159,13 @@ function Get-OSInfo {
|
||||
$nameValue = $osDetails.Caption
|
||||
|
||||
# Get architecture details of the OS (not the processor)
|
||||
$architecture = $osDetails.OSArchitecture
|
||||
# Get only the numbers
|
||||
$architecture = ($osDetails.OSArchitecture -replace "[^\d]").Trim()
|
||||
|
||||
# If 32-bit or 64-bit replace with x32 and x64
|
||||
if ($architecture -eq "32-bit") {
|
||||
if ($architecture -eq "32") {
|
||||
$architecture = "x32"
|
||||
} elseif ($architecture -eq "64-bit") {
|
||||
} elseif ($architecture -eq "64") {
|
||||
$architecture = "x64"
|
||||
}
|
||||
|
||||
@ -624,12 +626,20 @@ function Install-Prerequisite {
|
||||
throw
|
||||
}
|
||||
|
||||
Write-Output "URL: ${url}"
|
||||
Write-Output "`nInstalling ${arch} ${Name}..."
|
||||
if ($DebugMode) {
|
||||
Write-Output "URL: ${url}`n"
|
||||
}
|
||||
Write-Output "Installing ${arch} ${Name}..."
|
||||
Add-AppxPackage $url -ErrorAction Stop
|
||||
Write-Output "`n$Name installed successfully."
|
||||
} catch {
|
||||
# Alternate method
|
||||
if ($_.Exception.Message -match '0x80073D02') {
|
||||
# If resources in use exception, fail immediately
|
||||
Handle-Error $_
|
||||
throw
|
||||
}
|
||||
|
||||
try {
|
||||
$url = $AlternateUrl
|
||||
|
||||
@ -758,6 +768,7 @@ if ($CheckForUpdate) {
|
||||
|
||||
# Heading
|
||||
Write-Output "winget-install $CurrentVersion"
|
||||
Write-Output "To check for updates, run winget-install -CheckForUpdate"
|
||||
|
||||
# Set OS version
|
||||
$osVersion = Get-OSInfo
|
||||
@ -891,7 +902,7 @@ try {
|
||||
if (Get-WingetStatus -eq $true) {
|
||||
Write-Output "winget is installed and working now, you can go ahead and use it."
|
||||
} else {
|
||||
Write-Warning "winget is installed but is not detected as a command. Try using winget now. If it doesn't work, try restarting your computer."
|
||||
Write-Warning "winget is installed but is not detected as a command. Try using winget now. If it doesn't work, wait about 1 minute and try again (it is sometimes delayed). Also try restarting your computer."
|
||||
Write-Warning "If you restart your computer and the command still isn't recognized, please read the Troubleshooting section`nof the README: https://github.com/asheroto/winget-install#troubleshooting`n"
|
||||
Write-Warning "Make sure you have the latest version of the script by running this command: $PowerShellGalleryName -CheckForUpdate"
|
||||
}
|
||||
@ -911,4 +922,4 @@ try {
|
||||
}
|
||||
Write-Warning "Error: $($_.Exception.Message)`n"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user