Update winget-install-and-update.ps1

pull/2/head
Romanitho 2022-01-27 00:20:46 +01:00 committed by GitHub
parent d27e73802c
commit c304168b1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,10 @@
#Create winget-update folder and content structure #Create winget-update folder and content structure
$WingetUpdatePath = "$env:ProgramData\winget-update" $WingetUpdatePath = "$env:ProgramData\winget-update"
Write-host "###################################"
Write-host "# #"
Write-host "# Winget AutoUpdate #"
Write-host "# #"
Write-host "################################### `n"
Write-host "Instaling to $WingetUpdatePath\" Write-host "Instaling to $WingetUpdatePath\"
#Check if Visual C++ 2015-2019 is installed. If not, download and install #Check if Visual C++ 2015-2019 is installed. If not, download and install
@ -13,7 +18,7 @@ if (!($path)){
Invoke-WebRequest $SourceURL -OutFile $Installer Invoke-WebRequest $SourceURL -OutFile $Installer
Write-host "Installing VC_redist.x64.exe..." Write-host "Installing VC_redist.x64.exe..."
Start-Process -FilePath $Installer -Args "-q" -Wait Start-Process -FilePath $Installer -Args "-q" -Wait
Remove-Item $Installer Remove-Item $Installer -ErrorAction SilentlyContinue
} }
try{ try{