Merge branch 'Romanitho:main' into SymLink_Fix
commit
3e860ec211
|
@ -44,7 +44,7 @@ jobs:
|
||||||
id: ml
|
id: ml
|
||||||
# You can override MegaLinter flavor used to have faster performances
|
# You can override MegaLinter flavor used to have faster performances
|
||||||
# More info at https://megalinter.github.io/flavors/
|
# More info at https://megalinter.github.io/flavors/
|
||||||
uses: oxsecurity/megalinter@03986e6993ccf699a22451118520680b438e7d2a # v7.11.1
|
uses: oxsecurity/megalinter@5199c6377b4cb7faff749a1971636f3343db9fe6 # v7.12.0
|
||||||
env:
|
env:
|
||||||
# All available variables are described in documentation
|
# All available variables are described in documentation
|
||||||
# https://megalinter.github.io/configuration/
|
# https://megalinter.github.io/configuration/
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1.20.1-1
|
1.20.2-0
|
|
@ -13,6 +13,9 @@ Forward Winget App ID to install. For multiple apps, separate with ",". Case sen
|
||||||
.PARAMETER Uninstall
|
.PARAMETER Uninstall
|
||||||
To uninstall app. Works with AppIDs
|
To uninstall app. Works with AppIDs
|
||||||
|
|
||||||
|
.PARAMETER AllowUpgrade
|
||||||
|
To allow upgrade app if present. Works with AppIDs
|
||||||
|
|
||||||
.PARAMETER LogPath
|
.PARAMETER LogPath
|
||||||
Used to specify logpath. Default is same folder as Winget-Autoupdate project
|
Used to specify logpath. Default is same folder as Winget-Autoupdate project
|
||||||
|
|
||||||
|
@ -34,6 +37,9 @@ If '-Uninstall' is used, it removes the app from WAU White List.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
.\winget-install.ps1 -AppIDs "7zip.7zip -v 22.00", "Notepad++.Notepad++"
|
.\winget-install.ps1 -AppIDs "7zip.7zip -v 22.00", "Notepad++.Notepad++"
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
.\winget-install.ps1 -AppIDs "Notepad++.Notepad++" -AllowUpgrade
|
||||||
#>
|
#>
|
||||||
|
|
||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
|
@ -41,7 +47,8 @@ param(
|
||||||
[Parameter(Mandatory = $True, ParameterSetName = "AppIDs")] [String[]] $AppIDs,
|
[Parameter(Mandatory = $True, ParameterSetName = "AppIDs")] [String[]] $AppIDs,
|
||||||
[Parameter(Mandatory = $False)] [Switch] $Uninstall,
|
[Parameter(Mandatory = $False)] [Switch] $Uninstall,
|
||||||
[Parameter(Mandatory = $False)] [String] $LogPath,
|
[Parameter(Mandatory = $False)] [String] $LogPath,
|
||||||
[Parameter(Mandatory = $False)] [Switch] $WAUWhiteList
|
[Parameter(Mandatory = $False)] [Switch] $WAUWhiteList,
|
||||||
|
[Parameter(Mandatory = $False)] [Switch] $AllowUpgrade
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -136,7 +143,7 @@ function Test-ModsUninstall ($AppID) {
|
||||||
#Install function
|
#Install function
|
||||||
function Install-App ($AppID, $AppArgs) {
|
function Install-App ($AppID, $AppArgs) {
|
||||||
$IsInstalled = Confirm-Installation $AppID
|
$IsInstalled = Confirm-Installation $AppID
|
||||||
if (!($IsInstalled)) {
|
if (!($IsInstalled) -or $AllowUpgrade ) {
|
||||||
#Check if mods exist (or already exist) for preinstall/install/installedonce/installed
|
#Check if mods exist (or already exist) for preinstall/install/installedonce/installed
|
||||||
$ModsPreInstall, $ModsInstall, $ModsInstalledOnce, $ModsInstalled = Test-ModsInstall $($AppID)
|
$ModsPreInstall, $ModsInstall, $ModsInstalledOnce, $ModsInstalled = Test-ModsInstall $($AppID)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue