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
|
||||||
|
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
lfs: "true"
|
lfs: "true"
|
||||||
|
|
||||||
- name: Auto Increment Semver Action
|
- name: Auto Increment Semver Action
|
||||||
uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2
|
uses: MCKanpolat/auto-semver-action@5003b8d37f4b03d95f15303ea10242cbf7c13141 # 2
|
||||||
id: versioning
|
id: versioning
|
||||||
with:
|
with:
|
||||||
releaseType: ${{ github.event.inputs.version }}
|
releaseType: ${{ github.event.inputs.version }}
|
||||||
|
@ -39,14 +39,14 @@ jobs:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- 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 }}"
|
||||||
|
|
||||||
- name: Commit & Push
|
- name: Commit & Push
|
||||||
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
|
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 # v1.5
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: main
|
branch: main
|
||||||
|
@ -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
|
||||||
|
@ -87,7 +87,7 @@ jobs:
|
||||||
echo "Install counter file." > WAU_InstallCounter
|
echo "Install counter file." > WAU_InstallCounter
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
|
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
|
||||||
with:
|
with:
|
||||||
tag: "v${{ steps.versioning.outputs.version }}"
|
tag: "v${{ steps.versioning.outputs.version }}"
|
||||||
prerelease: ${{ github.event.inputs.pre-release }}
|
prerelease: ${{ github.event.inputs.pre-release }}
|
||||||
|
|
|
@ -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