def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\msiexec.exe"),
            any(
                [
                    " -Y" in event.deep_get("CommandLine", default=""),
                    " /Y" in event.deep_get("CommandLine", default=""),
                    " –Y" in event.deep_get("CommandLine", default=""),
                    " —Y" in event.deep_get("CommandLine", default=""),
                    " ―Y" in event.deep_get("CommandLine", default=""),
                ]
            ),
            not any(
                [
                    '\\MsiExec.exe" /Y "C:\\Program Files\\'
                    in event.deep_get("CommandLine", default=""),
                    '\\MsiExec.exe" /Y "C:\\Program Files (x86)\\'
                    in event.deep_get("CommandLine", default=""),
                    '\\MsiExec.exe" /Y "C:\\Windows\\System32\\'
                    in event.deep_get("CommandLine", default=""),
                    '\\MsiExec.exe" /Y "C:\\Windows\\SysWOW64\\'
                    in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
