<PAGE>   1
                                                                    EXHIBIT 10.2




                       STOCK PURCHASE AND TERMINATION OF
                                 LOAN AGREEMENT


This Agreement is made this 13th day of December, 1996, by and among ARI Network
Services, Inc. (The "Company"), QUAESTUS Limited Partnership ("QLP") and WITECH
Corporation ("WITECH").

     1.   Stock Purchase.  QLP agrees to pay to the Company Three Hundred Thirty
          Three Thousand Dollars ( $333,000) to purchase One Hundred Forty Eight
          (148,000) shares of Common Stock of the Company. WITECH agrees to pay
          to the Company Six Hundred Sixty Seven Thousand Dollars ($667,000) to
          purchase Two Hundred Ninety Six Thousand Four Hundred and Forty-four
          (296,444) Shares of Common Stock of the "Shares."  The Company agrees
          to deliver certificates for the Shares within five (5) business days,
          which certificates shall bear a legend relating to the restriction on
          transfer imposed by applicable law.

     2.   Acknowledgments.  QLP and WITECH each acknowledge that the Shares have
          not been registered under the Securities Act of 1933, as amended, and
          each represents and warrants to and agrees with the Company as
          follows:

          a)   It is acquiring the Shares for its own account and not with a
               view to the distribution thereof.

          b)   It will not offer, sell, pledge or otherwise dispose of the
               Shares except pursuant to an effective registration statement or
               an exemption from registration under the Securities Act.

     3.   Loan Pay-off.  The Company agrees to pay in full all principal,
          interest and other amounts payable under that certain Loan Agreement
          (the "Loan Agreement") dated December 2, 1994, as amended, by and
          among the parties hereto.  The amount so payable is agreed to be One
          Million Four Hundred Sixty Five Thousand Seventy Three Dollars and
          Twenty-five Cents ($1,465,073.25) plus accrued interest as of the date
          hereof.  The Company may apply all or any portion of the purchase
          price of the Shares toward payment of such amount.  Upon payment
          thereof, the Loan Agreement shall be terminated and of no further
          force or effect.

                                       1

<PAGE>   2





     4.   Closing.  The Purchase and sale of the Shares and the pay-off of the
          Loan Agreement shall occur simultaneously upon execution hereof.

     5.   Piggyback Registration Rights.

          (a)  If at anytime the Company proposes to register any shares of
     Common Stock under the Securities Act of 1933 (the "Act") for sale for cash
     (otherwise than in connection with the registration of securities issuable
     pursuant to an employee stock option, director stock option, stock purchase
     or similar plan or pursuant to a merger, exchange offer or in a transaction
     of the type specified in Rule 145(a) under the Act), the Company shall give
     WITECH and QLP (individually an "Investor" or collectively the "Investors")
     notice of such proposed registration at least thirty (30) days prior to the
     filling of the registration statement.  At the written request of either
     Investor delivered to the Company within fifteen (15) days after the
     receipt of the notice from the Company, which request shall state the
     number of Shares that the Investor wishes to sell or distribute publicly
     under the registration statement proposed to be filed by the Company, the
     Company shall use its reasonable best efforts to register under the Act
     such Shares, and to cause such registration (the "Piggyback Registration")
     to become and remain effective as provided in Paragraph 6, below.

          (b)  If a Piggyback Registration is an underwritten primary
     registration on behalf of the Company, and the managing underwriters
     thereof advise the Company in writing that in their opinion the number of
     securities requested to be included in such registration exceeds the number
     which can be sold in such offering, the Company will include in such
     registration (i) first, the securities the Company proposes to sell and
     (ii) second, the securities the Investor(s) and any other stockholder of
     the Company proposes top sell in proportion to the number of shares such
     proposes to sell.

          (c) If a Piggyback Registration is an underwritten secondary
     registration on behalf of holders of the Company's securities, and the
     managing underwriters thereof advise the Company in writing that in their
     opinion the number of securities requested to be included in such
     registration exceeds the number which can be sold in such offering, the
     Company will include in such registration the securities Investor(s) and
     any other stockholders of the Company proposes to sell in proportion to the
     number of shares each proposes to sell.  In the event the Company
     subsequently desires to participate in such a registration of securities,
     the provisions of Section 5(b)  (and not of this Section 5 (c) shall apply
     with respect to determining priority on such registration.


                                       2


<PAGE>   3




     6.   Registration Covenants of the Company.  In the event that Investors
          elect to exercise their registration rights, the Company covenants and
          agrees that the Company will use its reasonable best efforts to effect
          the registration and cooperate in the sale of the Shares to be
          registered (the "Registered Shares") and will as expeditiously as
          possible:

               a) prepare and file with the SEC a registration statement with
          respect to the Registration Shares (as well as any necessary
          amendments or supplements thereto) (a "Registration Statement") which
          Registration Statement will state that the holders of Registration
          Shares covered thereby may sell such Registration Shares either under
          such Registration Statement or pursuant to Rule 144 (or any similar
          rule then in effect), and use its reasonable best efforts to cause
          such Registration Statement to become effective;

               b) furnish to the Investor(s) copies of the Registration
          Statement and any amendments or supplements thereto and any prospectus
          forming a part thereof prior to filing, which documents will be
          subject to the review of counsel for the Investors (but not approval
          of such counsel except with respect to any statement in the
          Registration Statement which relates to the Investor);

               c) notify the Investor, promptly after the Company shall receive
          notice thereof, of the time when said Registration Statement became
          effective or when any amendment or supplement to any prospectus
          forming a part of said Registration Statement has been filed;

               d) notify the Investors promptly of any request by the SEC or any
          state securities administrator for the amending or supplementing of
          such Registration Statement or prospectus or for additional
          information;

               e) advise the Investors after the Company shall receive notice or
          obtain knowledge thereof of the issuance of any order by the SEC or
          any state securities administrator suspending the effectiveness of any
          such Registration Statement or amendment thereto or of the initiation
          or threatening of any proceeding for that purpose, and promptly use
          its reasonable best efforts to prevent the issuance of any stop order
          or to obtain its withdrawal promptly if such stop order should be
          issued;

               f) prepare and file with the SEC such amendments and supplements
          to such Registration Statement and the prospectus forming a part
          thereof as may be necessary to keep such Registration Statement
          effective for the least of (i) a period of time necessary to permit
          Investor(s) pursuant to such 

                                       3


<PAGE>   4

          Registration to dispose of all of such Registration Shares, (ii) six
          months and (iii) the maximum period of time permitted by law to keep
          effective a registration statement, and comply with the provisions of
          the Act with respect to the disposition of all securities covered by
          such Registration Statement during such period in accordance with the
          intended methods of dispositions  by Investor(s) set forth in such
          Registration Statement;

               g) furnish to the Investors such number of copies of the
          Registration Statement, each amendment and supplement thereto, the
          prospectus included in such Registration Statement (including such
          preliminary prospectus) and other documents as the Investors may
          reasonably request in order to facilitate the disposition of the
          Registration Shares;

               h) use its reasonable best efforts to register or qualify the
          Registration Shares under such other securities or blue sky laws of
          jurisdictions as determined by the underwriter after consultation with
          the Company and the Investors and do any and all others acts and
          things which may be reasonably necessary or advisable to enable the
          Investors to consummate the disposition in such jurisdictions of the
          Registration Shares (provided that the Company will not be required to
          (i) qualify generally to do business in any jurisdiction where it
          would not otherwise be required to qualify but for this paragraph,
          (ii) subject itself to taxation in any such jurisdiction or (iii)
          consent to general service of process in any such jurisdiction);

               i) notify the Investors at any time when a prospectus relating
          thereto is required to be delivered under the Act, of the happening of
          any event as a result of which  such Registration Statement contains
          an untrue statement of a material fact or omits to state any material
          fact required to be stated therein or necessary to make the statements
          therein not misleading and, at the request of the Investors, prepare a
          supplement or amendment to such Registration Statement so that such
          Registration Statement will not contain, to the Company's knowledge,
          an untrue statement of a material fact or omit to state any material
          fact required to be stated therein or necessary to make the statements
          therein not misleading;


                                       4


<PAGE>   5
               j) cause all Registration Shares to be listed on each securities
          exchange on which similar securities issued by the Company are then
          listed or, if similar securities are not then listed, take all
          reasonable action either to list the Registration Shares on a
          securities exchange or facilitate the reporting of the securities on
          the National Association of Securities  Dealers, Inc. Automated
          Quotation System;

               k) enter into such customary agreements (including an
          underwriting agreement in customary form) and take all such other
          actions as the investors or the underwriters, if any, reasonably
          request in order to expedite or facilitate the disposition of the
          Registration Shares;

               l) make available for inspection by the Investors, any
          underwriter participating in any disposition pursuant to such
          Registration Statement, and any attorney, accountant or other agent
          retained by the Investors or such underwriter, all financial and other
          records, pertinent corporate documents and properties of the Company,
          and cause the Company's officers, directors and employees to supply
          all information reasonably requested by the Investors, such
          underwriter, attorney, accountant or agent in connection with such
          Registration Statement; and

               m) Either Investor may assign all or any part of its rights under
          this Section 6 to anyone to whom such Investor transfers the Shares.
          Any registration of Investor's Shares may include shares of the
          Company's Common Stock owned by other shareholders of the Company with
          demand and/or piggyback registration rights.

     7.   Conditions.  If the Company determines, in its good faith judgment
          that because of the existence of, or in anticipation of, any
          acquisition or financing activity, the unavailability of any required
          financial statements, or the existence of any other material
          non-public information (a "Disadvantageous Condition"), it would be
          significantly disadvantageous to the Company for the Registration
          Statement to be maintained effective, or to be filed and become
          effective, or for Registration Shares to be sold under the
          Registration Statement, then anything herein to the contrary
          notwithstanding, the Company shall be entitled, until such
          Disadvantageous Condition no longer exists, to (i) cause such
          Registration Statement to be withdrawn and the effectiveness of such
          Registration Statement to be delayed or terminated; (ii) notify
          Investors not to make any sales under the Registration Statement; or
          (iii) in the event no Registration Statement has yet been filed, to
          refuse to file any such

                                       5


<PAGE>   6



          Registration Statement, upon receipt of any notice of a
          Disadvantageous Condition and until notified by the Company that such
          Disadvantageous Condition no longer exists, the Investors must
          discontinue offers or sales of Registration Shares.

     8.   Indemnification and Contribution.  In connection with the registration
          of the Registration Shares, the Company and the Investors will enter
          into customary indemnification and contribution arrangements with
          respect to information provided by each of them.

     9.   Investors Cooperation in Registration.  In connection with a
          registration of the Shares, Investors will (a) cooperate with the
          Company and the underwriter for the Registration shares, if any, in
          preparing the Registration Statement and execute all such agreements
          as the underwriter may deem reasonably necessary, (b) promptly supply
          the Company and the underwriter with all information, documents,
          representations and agreements as the underwriter or the Company may
          deem reasonably necessary, (c) discontinue sales of the Registration
          Shares upon notification of any stop order or suspension of the
          effectiveness of the Registration Statement, (d) notify the Company
          immediately upon any change in the plan of distribution or other
          information concerning the Investors described in the prospectus, and
          (e) discontinue use of any prospectus following notification by the
          Company that the prospectus must be amended or supplemented.

     10.  Expenses.  The Company shall pay all of the expenses in connection
          with the registration of Registration Shares pursuant to the exercise
          of these demand registration rights, including, without limitation,
          costs of complying with federal and state securities laws and
          regulations, attorney's and accounting fees of the Company, printing
          expenses and Federal and State filing fees, except for transfer taxes,
          underwriting commissions and discounts, and fees and expenses of
          counsel for the Investors.

     11.  Registration Period Defined.  For purposes hereof, the term
          "Registration Period" shall mean the period commencing the date of
          this agreement through December 31, 1998.






                                       6
<PAGE>   7


     IN WITNESS WHEREOF, the undersigned has executed this Agreement as of the
date first above written.

                                     ARI NETWORK SERVICES


                                     By: /s/ Brian Dearing
                                        ---------------------------------------
                                         Brian E. Dearing
                                         President and Chief Executive Officer




                                     QUAESTUS LIMITED PARTNERSHIP

                                     By: /s/ Richard Weening
                                        --------------------------------------
                                        Richard Weening, Managing Partner





                                     WITECH CORPORATION

                                     By:  /s/ Francis Brzezinski
                                        --------------------------------------
                                        Francis Brzezinski, President