def rule(event):
    if all(
        [
            any(
                [
                    "\\AppData\\Roaming\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
            "\\{" in event.deep_get("CommandLine", default=""),
            "}\\" in event.deep_get("CommandLine", default=""),
            not any(
                [
                    all(
                        [
                            "\\{" in event.deep_get("Image", default=""),
                            "}\\" in event.deep_get("Image", default=""),
                        ]
                    ),
                    event.deep_get("Image", default="") == "",
                    event.deep_get("Image", default="") == "C:\\Windows\\System32\\drvinst.exe",
                    event.deep_get("Image", default="")
                    in ["C:\\Windows\\System32\\msiexec.exe", "C:\\Windows\\SysWOW64\\msiexec.exe"],
                ]
            ),
        ]
    ):
        return True
    return False
