06/19/2018 705 views
In the SCCM world, some people are using the following PowerShell scripts to disable update checks on VLC media player. I know there are other ways to get this done but so far this method seems to work better for us. Could someone please provide me guidance on how to get this done via Kace K1000?

Discovery Script

If(Test-Path $env:APPDATA\vlc\vlcrc)
$UpdateCheck1 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-notif” | Select-Object Line
$UpdateCheck2 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-privacy-ask” | Select-Object Line
$UpdateCheck3 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-days” | Select-Object Line

if(($UpdateCheck1.Line -eq ‘qt-updates-notif=0’) -and ($UpdateCheck2.Line -eq ‘qt-privacy-ask=0’) -and ($UpdateCheck3.Line -eq ‘qt-updates-days=0’))
{Write-Host ‘Compliant’}
{Write-Host ‘Non-Compliant’}
{Write-Host ‘Compliant’}

Remediation Script

If(Test-Path $env:APPDATA\vlc\vlcrc)
$UpdateCheck1 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-notif”
$UpdateCheck11 = $UpdateCheck1.Line
(Get-Content $env:APPDATA\vlc\vlcrc) -replace “$UpdateCheck11”, ‘qt-updates-notif=0’ | Set-Content $env:APPDATA\vlc\vlcrc
$UpdateCheck2 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-privacy-ask”
$UpdateCheck22 = $UpdateCheck2.Line
(Get-Content $env:APPDATA\vlc\vlcrc) -replace “$UpdateCheck22”, ‘qt-privacy-ask=0’ | Set-Content $env:APPDATA\vlc\vlcrc
$UpdateCheck3 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-days”
$UpdateCheck33 = $UpdateCheck3.Line
(Get-Content $env:APPDATA\vlc\vlcrc) -replace “$UpdateCheck33”, ‘qt-updates-days=0’ | Set-Content $env:APPDATA\vlc\vlcrc

0 Comments   [ + ] Show comments


All Answers

  • Just remember if you use replication shares that you will need to wait on replication of the script. You will only waste that 45 minutes of your life once!