wingetautoupdate/install.bat

16 lines
589 B
Batchfile

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