Skip to content

Commit

Permalink
Merge pull request #988 from sakshiagrwal/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
he3als authored Dec 11, 2023
2 parents eaa6306 + 4124811 commit 8d65a8d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/playbook/Executables/SOFTWARE.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,9 @@ if ($mpchc) {
# VLC
if ($vlc) {
Write-Host "Installing VLC..."
$url = "https://get.videolan.org/vlc/last/win64/"
$response = Invoke-WebRequest -Uri $url
$lines = $response.Content -split "`n"
$matchingLines = $lines | Where-Object { $_ -like '*win64.exe*' }
$filename = ($matchingLines -match 'href="([^"]+)"')[0] -replace '.*href="([^"]+)".*', '$1'
& curl.exe -LSs "$url$filename" -o "$tempDir\vlc.exe"
$baseUrl = "https://get.videolan.org/vlc/last/win64/"
$fileName = $((Invoke-WebRequest -Uri $baseUrl -UseBasicParsing).Links | Where-Object { $_.Href -like 'vlc*.exe' } | Select-Object -First 1 -ExpandProperty Href)
& curl.exe -LSs "$baseUrl$fileName" -o "$tempDir\vlc.exe"
Start-Process -FilePath "$tempDir\vlc.exe" -WindowStyle Hidden -ArgumentList '/S' -Wait 2>&1 | Out-Null
exit
}
Expand Down

0 comments on commit 8d65a8d

Please sign in to comment.