def METHOD_NAME(self, path):
    if not HAS_RARFILE:
        raise CuckooPackageError("rarfile Python module not installed in guest")
    # Check file extension.
    path = check_file_extension(path, ".rar")
    root = os.environ["TEMP"]
    password = self.options.get("password")
    exe_regex = re.compile(r"(\.exe|\.scr|\.msi|\.bat|\.lnk)$", flags=re.IGNORECASE)
    rarinfos = self.get_infos(path)
    self.extract_rar(path, root, password)
    file_name = self.options.get("file")
    # If no file name is provided via option, take the first file.
    if file_name is None:
        # No name provided try to find a better name.
        if len(rarinfos):
            # Attempt to find a valid exe extension in the archive
            for f in rarinfos:
                if exe_regex.search(f.filename):
                    file_name = f.filename
                    break
            # Default to the first one if none found
            file_name = file_name or rarinfos[0].filename
            log.debug("Missing file option, auto executing: %s", file_name)
        else:
            raise CuckooPackageError("Empty RAR archive")
    file_path = os.path.join(root, file_name)
    if file_name.lower().endswith(".lnk"):
        cmd_path = self.get_path("cmd.exe")
        cmd_args = f'/c start /wait "" "{file_path}"'
        return self.execute(cmd_path, cmd_args, file_path)
    return self.execute(file_path, self.options.get("arguments"), file_path)