def rule(event):
    if all(
        [
            "\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB\\"
            in event.deep_get("TargetObject", default=""),
            "\\DatabasePath" in event.deep_get("TargetObject", default=""),
            not ":\\Windows\\AppPatch\\Custom" in event.deep_get("Details", default=""),
        ]
    ):
        return True
    return False
