Merge pull request #224 from Romanitho/install-file

simplified install/uninstall batch files
pull/225/head
Romain 2022-10-28 01:21:04 +02:00 committed by GitHub
commit 57f629f8e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 3 deletions

View File

@ -1,5 +1,15 @@
@echo off @echo off
SET arguments=-UpdatesAtLogon -UpdatesInterval Weekly -StartMenuShortcut -InstallUserContext ::::::::::::::::::::::::::::
:: Put WAU Arguments here ::
::::::::::::::::::::::::::::
powershell -Command "Get-ChildItem -Path '%~dp0' -Recurse | Unblock-File; Start-Process powershell.exe -Argument '-noprofile -executionpolicy bypass -file """%~dp0Winget-AutoUpdate-Install.ps1"" %arguments%'" -Verb RunAs SET arguments=-UpdatesAtLogon -UpdatesInterval Weekly -InstallUserContext -StartMenuShortcut -DesktopShortcut
::::::::::::::::::::::::::::
:: Run Powershell Script ::
::::::::::::::::::::::::::::
SET PowershellCmd=Start-Process powershell.exe -Argument '-noprofile -executionpolicy bypass -file "%~dp0Winget-AutoUpdate-Install.ps1" %arguments%
powershell -Command "& {Get-ChildItem -Path '%~dp0' -Recurse | Unblock-File; %PowershellCmd%'}" -Verb RunAs

View File

@ -1,5 +1,15 @@
@echo off @echo off
::::::::::::::::::::::::::::
:: Put WAU Arguments here ::
::::::::::::::::::::::::::::
SET arguments=-Uninstall SET arguments=-Uninstall
powershell -Command "Get-ChildItem -Path '%~dp0' -Recurse | Unblock-File; Start-Process powershell.exe -Argument '-noprofile -executionpolicy bypass -file """%~dp0Winget-AutoUpdate-Install.ps1"" %arguments%'" -Verb RunAs
::::::::::::::::::::::::::::
:: Run Powershell Script ::
::::::::::::::::::::::::::::
SET PowershellCmd=Start-Process powershell.exe -Argument '-noprofile -executionpolicy bypass -file "%~dp0Winget-AutoUpdate-Install.ps1" %arguments%
powershell -Command "& {Get-ChildItem -Path '%~dp0' -Recurse | Unblock-File; %PowershellCmd%'}" -Verb RunAs