Adobe Flash Auto Update disable script

Use the following vbs script in order to disable the auto update feature of adobe flash player.


' Adobe Flash Auto Update Manage
' Use this script in order to manage the auto update for adobe flash
' Author: Christos Polydorou, xristos.polydoroy@gmail.com

' This routine calculates the path to the flash installation directory
Function GetSystemPath()
Set wshShell = CreateObject( "WScript.Shell" )
GetSystemPath = wshShell.ExpandEnvironmentStrings( "%systemroot%" ) + "\system32\Macromed\Flash\mms.cfg"
End Function

' This routine saves data to a UTF-8 file
Sub Save2File (sText, sFile)
    Dim oStream
    Set oStream = CreateObject("ADODB.Stream")
    With oStream
        .Open
        .CharSet = "utf-8"
        .WriteText sText
        .SaveToFile sFile, 2
    End With
    Set oStream = Nothing
End Sub

' This routine enable the auto updater
Sub Enable
Save2File "AutoUpdateDisable=0", GetSystemPath()
End Sub

' This routine disables the auto updater
Sub Disable
Save2File "AutoUpdateDisable=1", GetSystemPath()
End Sub

' Main program
If WScript.Arguments.Count = 1 Then
mode = WScript.Arguments.Item(0)

If mode = "enable" Then
enable
End IF

If mode = "disable" Then
disable
End If

Wscript.Quit
Else
Wscript.Echo "Usage: FlashAutoUpdateManager {enable | disable}"
Wscript.Quit
End If

Popular posts from this blog

Domain Controller Machine Password Reset

Managing Active Directory User Certificates using PowerShell

Configuring a Certificate on Exchange Receive Connector