/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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’}
else
{Write-Host ‘Non-Compliant’}
}
else
{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
}

Thanks,
Sam
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Answer this question or Comment on this question for clarity

Answers

1
Answered 06/20/2018 by: JasonEgg
Red Belt

  • 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!
Please log in to comment