Section 3B. The operation by any person, by himself or his agent, of any motor vehicle or trailer, whether registered or unregistered, and with or without a license to operate, on any way, or private way if entrance thereto was made from a way, or in any place to which the public has a right of access, in this commonwealth, shall be deemed equivalent to an appointment by such person of the registrar, or his successor in office, to be his true and lawful attorney upon whom may be served all lawful processes in any action or proceeding against him, or his executor or administrator, growing out of any accident or collision in which he or his agent may be involved while operating a motor vehicle or trailer on any way, or private way if entrance thereto was made from a way, or in any place to which the public has a right of access, in this commonwealth, and such operation shall be a signification of an agreement by such person that any such process against him, or his executor or administrator, which is served upon the registrar or his successor in office shall be of the same force and validity as if served upon him personally. This section shall not apply in case of any cause of action, for the service of process in which provision is made by section three A, nor shall it authorize service of process upon any person who has executed a power of attorney under section three D, or upon any foreign corporation which has executed a power of attorney under section three of chapter one hundred and eighty-one.