Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FileVersionInfo.IsPatched Property

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.

[Visual Basic]
Public ReadOnly Property IsPatched As Boolean
[C#]
public bool IsPatched {get;}
[C++]
public: __property bool get_IsPatched();
[JScript]
public function get IsPatched() : Boolean;

Property Value

true if the file is patched; otherwise, false.

Example

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.

[Visual Basic] 
Private Sub GetIsPatched()
    ' Get the file version for the notepad.
    Dim myFileVersionInfo As FileVersionInfo = _
        FileVersionInfo.GetVersionInfo("%systemroot%\Notepad.exe")
    
    ' Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " & myFileVersionInfo.IsPatched
End Sub 'GetIsPatched

[C#] 
private void GetIsPatched() {
    // Get the file version for the notepad.
    FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    // Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " + myFileVersionInfo.IsPatched;
 }
    

[C++] 
private:
void GetIsPatched() {
    // Get the file version for the notepad.
    FileVersionInfo* myFileVersionInfo = FileVersionInfo::GetVersionInfo(S"%systemroot%\\Notepad.exe");
 
    // Print whether the file has a patch installed.
    textBox1->Text = String::Format( S"File has patch installed: {0}", __box(myFileVersionInfo->IsPatched));
 }
    

[JScript] 
private function GetIsPatched() {
    //Get the file version for the notepad.
    var myFileVersionInfo : FileVersionInfo = FileVersionInfo.GetVersionInfo("%systemroot%\\Notepad.exe");
 
    //Print whether the file has a patch installed.
    textBox1.Text = "File has patch installed: " + myFileVersionInfo.IsPatched;
 }
    

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

FileVersionInfo Class | FileVersionInfo Members | System.Diagnostics Namespace

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft