-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for checking the presence of a Windows QFE update.
Requires Windows Vista or later as it uses WMI to check for the presence of the QFE.
- Loading branch information
Chris Crowther
committed
Sep 29, 2020
1 parent
3656750
commit 99f9f34
Showing
17 changed files
with
1,040 additions
and
803 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System.ComponentModel; | ||
|
||
namespace InstallerLib | ||
{ | ||
/// <summary> | ||
/// InstalledCheck of type "wus". | ||
/// </summary> | ||
public class InstalledCheckWindowsUpdate : InstalledCheck | ||
{ | ||
private string m_knowledgeBaseId; | ||
private bool m_defaultValue; | ||
|
||
public InstalledCheckWindowsUpdate() : base("check_wus") | ||
{ | ||
this.KnowledgeBaseId = "KB123456789"; | ||
this.DefaultValue = false; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the knowledge base ID of the QFE hotfix. | ||
/// </summary> | ||
[Description("QFE Knowledge base ID.")] | ||
[Required] | ||
public string KnowledgeBaseId | ||
{ | ||
get { return this.m_knowledgeBaseId; } | ||
set { this.m_knowledgeBaseId = value; } | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating the default value for the check. | ||
/// </summary> | ||
[Description("Default value for the check.")] | ||
public bool DefaultValue | ||
{ | ||
get { return this.m_defaultValue; } | ||
set { this.m_defaultValue = value; } | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void OnXmlWriteTag(XmlWriterEventArgs e) | ||
{ | ||
e.XmlWriter.WriteAttributeString("kb_id", this.m_knowledgeBaseId); | ||
e.XmlWriter.WriteAttributeString("default_value", this.m_defaultValue.ToString()); | ||
base.OnXmlWriteTag(e); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void OnXmlReadTag(XmlElementEventArgs e) | ||
{ | ||
ReadAttributeValue(e, "kb_id", ref this.m_knowledgeBaseId); | ||
ReadAttributeValue(e, "default_value", ref this.m_defaultValue); | ||
base.OnXmlReadTag(e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.