Configuration Manager 2012 Compliance Baseline to Disable Adobe Flash Player Automatic Updates

Posted: August 6, 2014 in System Center Configuration Manager 2012
Tags: , ,

In this post I’m not going to explain how to create a Compliance Item and Baseline for that you can review the previous post; Configuration Manager 2012 Compliance Baseline to Disable Adobe Air Automatic Updates.

Below you will find scripts for Discovery and Remediation of Adobe Flash Player automatic updates. The script works on both 32-bit and 64-bit systems and will check if mms.cfg exists, if mms.cfg does not exist it will be created and if mms.cfg already exist but is not compliant (aka. don’t contain the correct setting) the existing content will be kept and the string to disable automatic updates will be added.

<#
  This script will check if automatic updates is disabled and return a Compliant/Non-Compliant string.

  Created:     04.08.2014
  Version:     1.0
  Author:      Odd-Magne Kristoffersen
  Homepage:    https://sccmguru.wordpress.com/
    
  References:
  - Configure auto-update notification Flash Player
    http://helpx.adobe.com/flash-player/kb/administration-configure-auto-update-notification.html
  - Adobe Flash Player Administration Guide for Flash Player 14 
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_14_0_admin_guide.pdf
  - Adobe Flash Player Administration Guide for Microsoft Windows 8
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_13_0_admin_guide.pdf
#>

$OSArchitecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture

If($OSArchitecture.OSArchitecture -ne "32-bit")
    {
    $CFGExists = Test-Path -Path "$Env:WinDir\SysWow64\Macromed\Flash\mms.cfg"
         if($CFGExists -eq $True) 
         {$UpdateCheck = Select-String "$Env:WinDir\SysWow64\Macromed\Flash\mms.cfg" -pattern "AutoUpdateDisable=1" | Select-Object Line}
            if($UpdateCheck.Line -eq 'AutoUpdateDisable=1') {Write-Host 'Compliant'}
            else {Write-Host 'Non-Compliant'}
    }
else
    {
    $CFGExists = Test-Path -Path "$Env:WinDir\System32\Macromed\Flash\mms.cfg"
         if($CFGExists -eq $True) 
         {$UpdateCheck = Select-String "$Env:WinDir\System32\Macromed\Flash\mms.cfg" -pattern "AutoUpdateDisable=1" | Select-Object Line}
            if($UpdateCheck.Line -eq 'AutoUpdateDisable=1') {Write-Host 'Compliant'} 
            else {Write-Host 'Non-Compliant'}
    }
<#
  This script will disable automatic updates if it is enabled.

  Created:     04.08.2014
  Version:     1.0
  Author:      Odd-Magne Kristoffersen
  Homepage:    https://sccmguru.wordpress.com/
    
  References:
  - Adobe Flash Player Administration Guide for Flash Player 14 
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_14_0_admin_guide.pdf
  - Adobe Flash Player Administration Guide for Microsoft Windows 8
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_13_0_admin_guide.pdf
#>

$OSArchitecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture

If($OSArchitecture.OSArchitecture -ne "32-bit")
{
    $CFGPath = "$Env:WinDir\SysWow64\Macromed\Flash\mms.cfg"
    $CFGExists = Test-Path -Path $CFGPath
         if($CFGExists -eq $True) 
            {
            $a = Get-Content $CFGPath
            $b = 'AutoUpdateDisable=1'
            Set-Content $CFGPath -Value $b, $a}
            else
            {
            Add-Content $CFGPath "AutoUpdateDisable=1"
            }
}
else
{
    $CFGPath = "$Env:WinDir\System32\Macromed\Flash\mms.cfg"
    $CFGExists = Test-Path -Path $CFGPath
         if($CFGExists -eq $True) 
            {
            $a = Get-Content $CFGPath
            $b = 'AutoUpdateDisable=1'
            Set-Content $CFGPath -Value $b, $a}
            else
            {
            Add-Content $CFGPath "AutoUpdateDisable=1"
            }
}

You can also download the scripts here: Compliance Settings Scripts

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s