FileVersionInfo.IsPatched Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets a value that specifies whether the file has been modified and is not identical to the original shipping file of the same version number.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

Public ReadOnly Property IsPatched As Boolean

Property Value

Type: System.Boolean

true if the file is patched; otherwise, false.

The following example calls GetVersionInfo to get the FileVersionInfo for the Notepad. Then it displays the state of the Boolean IsPatched in a text box. This code assumes textBox1 has been instantiated.

Private Sub GetIsPatched()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo(Environment.SystemDirectory + "\Notepad.exe")

    ' Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " & myFileVersionInfo.IsPatched
End Sub 'GetIsPatched

.NET Framework
Available since 1.1
Return to top