Files
management-scripts/Install-4KVideoDownloader.ps1
T

18 lines
706 B
PowerShell
Raw Normal View History

2021-05-27 17:40:13 -04:00
## Specify the URL to download the app from
2021-05-27 17:21:33 -04:00
$URL = 'https://dl.4kdownload.com/app/4kvideodownloader_4.16.0_x64.msi'
2021-05-27 17:40:13 -04:00
## Make sure the app isn't already installed
If (! (Test-Path "${Env:ProgramFiles}\4KDownload\4kvideodownloader\4kvideodownloader.exe") ) {
## Download the installer
2021-05-27 17:21:33 -04:00
$INSTALLER = Download-File -URL $URL
2021-05-27 17:40:13 -04:00
## Install the app
2021-05-27 17:21:33 -04:00
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart" -Wait }
Catch { LogErr $_.Exception.Message }
2021-05-27 17:40:13 -04:00
## Delete the installer
2021-05-27 17:21:33 -04:00
LogMsg "Deleting downloaded installer from ""${INSTALLER}"""
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
Catch { LogErr $_.Exception.Message }
2021-05-27 17:40:13 -04:00
}