Files
management-scripts/Install-VLC.ps1
T

27 lines
999 B
PowerShell
Raw Normal View History

2020-10-19 11:24:07 -04:00
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
## Make sure we're running as admin
If ( IsAdmin )
{
## Get the correct URL
If ( Is64bit)
{ $URL = 'https://get.videolan.org/vlc/3.0.11/win64/vlc-3.0.11-win64.exe' }
Else
{ $URL = 'https://ftp.osuosl.org/pub/videolan/vlc/3.0.11/win32/vlc-3.0.11-win32.exe' }
## Download file and get local file name
$Installer = Download-File $URL
If ( Test-Path $Installer )
{
## Run silent install
Try { Start-Process $Installer -ArgumentList "/S" -Wait }
Catch { Write-Output $_.Exception.Message }
## Delete the file we downloaded
Try { Remove-Item $Installer -Force }
Catch { Write-Output $_.Exception.Message }
}
Else { Write-Output "The URL was not downloaded correctly: ${URL}" }
}
Else { Write-Output "You must run this script as an administrator" }