simplified install/uninstall batch files
parent
ea3680d54b
commit
bf76a06abc
14
install.bat
14
install.bat
|
@ -1,5 +1,15 @@
|
|||
@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
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
@echo off
|
||||
|
||||
::::::::::::::::::::::::::::
|
||||
:: Put WAU Arguments here ::
|
||||
::::::::::::::::::::::::::::
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue