Changed shortcut to bat (no admin rights needed)
parent
8c0c94cc4e
commit
8a41e74df4
|
@ -68,7 +68,7 @@ jobs:
|
||||||
- name: Overwrite Version.txt file
|
- name: Overwrite Version.txt file
|
||||||
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
||||||
with:
|
with:
|
||||||
path: Sources/WAU/Winget-AutoUpdate/Version.txt
|
path: Sources/Winget-AutoUpdate/Version.txt
|
||||||
write-mode: overwrite
|
write-mode: overwrite
|
||||||
contents: ${{ steps.versioning.outputs.version }}
|
contents: ${{ steps.versioning.outputs.version }}
|
||||||
|
|
||||||
|
@ -88,8 +88,8 @@ jobs:
|
||||||
echo "### Extract MSI ###"
|
echo "### Extract MSI ###"
|
||||||
7z x MicrosoftDeploymentToolkit_x64.msi
|
7z x MicrosoftDeploymentToolkit_x64.msi
|
||||||
|
|
||||||
echo "### Copy ServiceUI.exe to 'Sources/WAU/Winget-AutoUpdate' folder ###"
|
echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###"
|
||||||
mv Modena_File206 Sources/WAU/Winget-AutoUpdate/ServiceUI.exe -v
|
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
|
||||||
|
|
||||||
echo "### Go to Sources ###"
|
echo "### Go to Sources ###"
|
||||||
cd Sources
|
cd Sources
|
||||||
|
|
|
@ -41,7 +41,7 @@ jobs:
|
||||||
- name: Overwrite Version.txt file
|
- name: Overwrite Version.txt file
|
||||||
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3
|
||||||
with:
|
with:
|
||||||
path: Sources/WAU/Winget-AutoUpdate/Version.txt
|
path: Sources/Winget-AutoUpdate/Version.txt
|
||||||
write-mode: overwrite
|
write-mode: overwrite
|
||||||
contents: "${{ steps.versioning.outputs.version }}"
|
contents: "${{ steps.versioning.outputs.version }}"
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ jobs:
|
||||||
echo "### Extract MSI ###"
|
echo "### Extract MSI ###"
|
||||||
7z x MicrosoftDeploymentToolkit_x64.msi
|
7z x MicrosoftDeploymentToolkit_x64.msi
|
||||||
|
|
||||||
echo "### Copy ServiceUI.exe to 'Sources/WAU/Winget-AutoUpdate' folder ###"
|
echo "### Copy ServiceUI.exe to 'Sources/Winget-AutoUpdate' folder ###"
|
||||||
mv Modena_File206 Sources/WAU/Winget-AutoUpdate/ServiceUI.exe -v
|
mv Modena_File206 Sources/Winget-AutoUpdate/ServiceUI.exe -v
|
||||||
|
|
||||||
echo "### Go to Sources ###"
|
echo "### Go to Sources ###"
|
||||||
cd Sources
|
cd Sources
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
@@:: This prolog allows a PowerShell script to be embedded in a .CMD file.
|
||||||
|
@@:: Any non-PowerShell content must be preceeded by "@@"
|
||||||
|
@@setlocal
|
||||||
|
@@set POWERSHELL_BAT_ARGS=%*
|
||||||
|
@@if defined POWERSHELL_BAT_ARGS set POWERSHELL_BAT_ARGS=%POWERSHELL_BAT_ARGS:"=\"%
|
||||||
|
@@PowerShell -NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -Command Invoke-Expression $('$args=@(^&{$args} %POWERSHELL_BAT_ARGS%);'+[String]::Join([char]10,$((Get-Content '%~f0') -notmatch '^^@@'))) & goto :EOF
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Install and configure Winget-AutoUpdate
|
Install and configure Winget-AutoUpdate
|
||||||
|
@ -21,7 +28,7 @@ if ( $psversionTable.PSEdition -eq "core" ) {
|
||||||
import-Module -name Appx -UseWIndowsPowershell -WarningAction:SilentlyContinue
|
import-Module -name Appx -UseWIndowsPowershell -WarningAction:SilentlyContinue
|
||||||
}
|
}
|
||||||
|
|
||||||
$Script:WAUConfiguratorVersion = Get-Content "$PSScriptRoot\Winget-AutoUpdate\Version.txt"
|
$Script:WAUConfiguratorVersion = Get-Content ".\Winget-AutoUpdate\Version.txt"
|
||||||
|
|
||||||
|
|
||||||
<# FUNCTIONS #>
|
<# FUNCTIONS #>
|
||||||
|
@ -176,12 +183,12 @@ function Start-Installations {
|
||||||
if ($WAUUseWhiteList) {
|
if ($WAUUseWhiteList) {
|
||||||
$WAUParameters += "-UseWhiteList "
|
$WAUParameters += "-UseWhiteList "
|
||||||
if ($WAUListPath) {
|
if ($WAUListPath) {
|
||||||
Copy-Item $WAUListPath -Destination "$PSScriptRoot\included_apps.txt" -Force -ErrorAction SilentlyContinue
|
Copy-Item $WAUListPath -Destination ".\included_apps.txt" -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ($WAUListPath) {
|
if ($WAUListPath) {
|
||||||
Copy-Item $WAUListPath -Destination "$PSScriptRoot\excluded_apps.txt" -Force -ErrorAction SilentlyContinue
|
Copy-Item $WAUListPath -Destination ".\excluded_apps.txt" -Force -ErrorAction SilentlyContinue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($WAUDesktopShortcut) {
|
if ($WAUDesktopShortcut) {
|
||||||
|
@ -195,7 +202,7 @@ function Start-Installations {
|
||||||
}
|
}
|
||||||
|
|
||||||
#Install Winget-Autoupdate
|
#Install Winget-Autoupdate
|
||||||
Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command ""& '$PSScriptRoot\Winget-AutoUpdate-Install.ps1' $WAUParameters""" -Wait -Verb RunAs
|
Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command ""& '.\Winget-AutoUpdate-Install.ps1' $WAUParameters""" -Wait -Verb RunAs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -268,7 +275,7 @@ function Start-Uninstallations ($AppToUninstall) {
|
||||||
|
|
||||||
#Run Winget-Install -Uninstall
|
#Run Winget-Install -Uninstall
|
||||||
$AppsToUninstall = "'$($AppToUninstall -join "','")'"
|
$AppsToUninstall = "'$($AppToUninstall -join "','")'"
|
||||||
Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command `"$PSScriptRoot\Winget-AutoUpdate\Winget-Install.ps1 -AppIDs $AppsToUninstall -Uninstall`"" -Wait -Verb RunAs
|
Start-Process "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -Command `".\Winget-AutoUpdate\Winget-Install.ps1 -AppIDs $AppsToUninstall -Uninstall`"" -Wait -Verb RunAs
|
||||||
|
|
||||||
Close-PopUp
|
Close-PopUp
|
||||||
}
|
}
|
Loading…
Reference in New Issue