tidy up and check for previous install
This commit is contained in:
@@ -1,16 +1,18 @@
|
|||||||
|
## Specify the URL to download the app from
|
||||||
|
|
||||||
## Specify the URL to download 4K Video Downloader from
|
|
||||||
$URL = 'https://dl.4kdownload.com/app/4kvideodownloader_4.16.0_x64.msi'
|
$URL = 'https://dl.4kdownload.com/app/4kvideodownloader_4.16.0_x64.msi'
|
||||||
|
|
||||||
## Install Adobe Connect
|
## Make sure the app isn't already installed
|
||||||
If ( IsURLValid $URL ) {
|
If (! (Test-Path "${Env:ProgramFiles}\4KDownload\4kvideodownloader\4kvideodownloader.exe") ) {
|
||||||
LogMsg "Downloading installer from ${URL}"
|
|
||||||
|
## Download the installer
|
||||||
$INSTALLER = Download-File -URL $URL
|
$INSTALLER = Download-File -URL $URL
|
||||||
|
|
||||||
|
## Install the app
|
||||||
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart" -Wait }
|
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart" -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
|
## Delete the installer
|
||||||
LogMsg "Deleting downloaded installer from ""${INSTALLER}"""
|
LogMsg "Deleting downloaded installer from ""${INSTALLER}"""
|
||||||
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
|
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
}
|
}
|
||||||
Else { LogMsg "URL is not valid: ${URL}" }
|
|
||||||
Reference in New Issue
Block a user