1

                                                                   EXHIBIT 10.4

                          Cooperative Computing, Inc.
                               6207 Bee Cave Road
                              Austin, Texas 78746


                                 June 14, 1999



Michael Aviles
6106 Northwood
Dallas, Texas 75225

Dear Mike:

         We are pleased to offer you employment as President and Chief
Operating Officer of Cooperative Computing, Inc. on the terms described on the
attached Term Sheet. If you desire to accept this offer, please sign and date
this letter in the space provided below, execute a copy of the
Noncompetition/Nonsolicitation Agreement included with this letter, and return
both documents to Joe Colonnetta at 200 Crescent Court, Suite 1600, Dallas,
Texas. This offer will expire and be of no force and effect if not accepted
today.

         A form of option agreement evidencing the options to be granted to you
will be forwarded to you for signature promptly.

                                            Very truly yours,

                                            COOPERATIVE COMPUTING, INC.


                                            By: /s/ J. D. FURST
                                                Jack D. Furst, Director


                                            By: /s/ JOE COLONNETTA
                                                Joe Colonnetta, Director

AGREED AND ACCEPTED:

/s/ MICHAEL A. AVILES
Michael Aviles

Date: June 14, 1999

   2

                              PROJECT BRIGHT STAR
                              TERMS OF EMPLOYMENT

         The following is a summary of the terms of employment between
Cooperative Computing, Inc. (the "Company") and Michael Aviles (the
"Executive").

         TITLES:                    President and Chief Operating Officer

         RESPONSIBILITIES:          Reporting directly to the Executive
                                    Committee of the Company (Tom Hicks, Jack
                                    Furst, Glenn Staats and Joe Colonnetta),
                                    with direct and primary responsibility over
                                    the Automotive and Hard Lines Divisions
                                    (which are the principal divisions of the
                                    Company, excluding Europe), including
                                    sales, marketing, manufacturing, logistics,
                                    implementation and customer service.



         TERM:                      From June 1999, through September 30, 2002
                                    (the "Initial Term"), automatically renewed
                                    on a year to year basis unless either party
                                    elects not to renew at least 60 days prior
                                    to the end of the then applicable term. For
                                    the purposes of any renewal, unless
                                    otherwise agreed, Executive's annual base
                                    salary will equal that applicable at the
                                    end of the prior term. Executive's bonus,
                                    if any, will be as provided in any bonus
                                    plan then applicable to executive officers
                                    of the Company generally or as otherwise
                                    agreed.

         BASE COMPENSATION:         $350,000 annually, payable monthly in
                                    arrears

         QUARTERLY BONUS:           During the Initial Term, Executive will be
                                    eligible to receive bonuses of up to 50% of
                                    Executive's base salary in effect during
                                    such quarter, with the actual amount to be
                                    determined based upon the Company's
                                    achievement of quarterly financial and
                                    other objectives. Notwithstanding the
                                    foregoing, the Executive will be entitled
                                    to a bonus during the first four full
                                    quarters of the Initial Term $43,750 for
                                    each such quarter, to the extent Executive
                                    remains employed by the Company during the
                                    applicable quarter. The bonuses will be
                                    payable quarterly in arrears.

         SPECIAL  CASH INCENTIVE:   In addition to the base compensation and
                                    quarterly bonus described above, Executive
                                    will be entitled during the Initial Term to
                                    receive a special cash bonus of (a) $1.5
                                    million upon the achievement of the First
                                    Hurdle (described below), (b) $2.0 million
                                    upon the achievement of the Second Hurdle
                                    (described below) and (c) $1.5 million upon
                                    achievement of the Third Hurdle (described
                                    below). The First Hurdle will be satisfied
                                    as of the end

   3

                                    of the first fiscal year in which the
                                    Company achieves a $5.0 million increase in
                                    Consolidated EBITDA (as defined in the
                                    Company's indenture governing its 9% senior
                                    subordinated notes due 2008, provided that
                                    such Consolidated EBITDA will not be
                                    impacted negatively or positively by SOP
                                    97-2 or by write downs of accounts
                                    receivable within the first 18 months of
                                    employment) versus the Consolidated EBITDA
                                    for the fiscal year ended September 30,
                                    1999 ("Base Cash Flow"); the Second Hurdle
                                    will be satisfied as of the end of the
                                    first fiscal year in which the Company
                                    achieves a $10.0 million increase in
                                    Consolidated EBITDA versus the Base Cash
                                    Flow; and the Third Hurdle will be
                                    satisfied as of the end of the first fiscal
                                    year in which the Company achieves a $15.0
                                    million increase in Consolidated EBITDA
                                    versus the Base Cash Flow. These bonuses
                                    will be cumulative in the event the Company
                                    achieves more than one hurdle as of the end
                                    of any particular fiscal year (for example,
                                    if Consolidated EBITDA for the fiscal year
                                    ended September 30, 2000 is $10.0 million
                                    greater than the Base Cash Flow, Executive
                                    would be entitled to a $3.5 million bonus)
                                    and once a bonus is paid as to a particular
                                    hurdle, Executive will not be entitled to
                                    any further bonus in respect of that hurdle
                                    (for example, if the Company pays the $3.5
                                    million bonus as provided in the prior
                                    example, and the Consolidated EBITDA for
                                    the next fiscal year is $15 million greater
                                    than the Base Cash Flow, Executive will be
                                    entitled to an additional one time bonus of
                                    $1.5 million in respect of the Third
                                    Hurdle, and no further special bonuses
                                    would be payable). Any bonus payable
                                    pursuant to this provision will be payable
                                    within 30 days after approval by the Audit
                                    Committee of the computation of
                                    Consolidated EBITDA for the applicable
                                    fiscal year (but in no event later than 120
                                    after the end of such fiscal year).
                                    Executive will also be entitled to a one
                                    time cash bonus of $5.0 million (less any
                                    bonuses previously paid pursuant to the
                                    provisions of the first sentence above)
                                    upon the occurrence during the Initial Term
                                    of either of the events specified in
                                    paragraphs (a) or (c) of the definition of
                                    Change of Control set forth below under
                                    "Stock Options" (to the extent Executive is
                                    employed by the Company at the time of such
                                    event). In addition, in the event the
                                    Company has achieved the Second Hurdle or
                                    is reasonably likely to achieve the Second
                                    Hurdle, Executive is terminated during the
                                    Initial


                                       2
   4

                                    Term without Cause (as defined) or
                                    Executive terminates his employment for
                                    Good Reason (as defined) while ongoing
                                    discussions are taking place between the
                                    Company and one or more other persons
                                    relating to a transaction (the "Pending
                                    Transaction") that will result in the
                                    occurrence of one of the events specified
                                    in clause (a) or (c) of the definition of
                                    Change of Control, and such Pending
                                    Transaction is consummated within 120 days
                                    after the date of Executive's termination,
                                    Executive shall be entitled to receive (in
                                    addition to any other amounts payable to
                                    Executive upon such termination) upon
                                    consummation of the Pending Transaction a
                                    one time cash bonus of $5.0 million (less
                                    any bonuses previously paid pursuant to the
                                    first sentence of this paragraph).


         TERMINATION:               If terminated for Cause, if the employee
                                    resigns voluntarily without Cause, or if
                                    Executive's employment terminates as a
                                    result of his death or disability, the
                                    employee is entitled to no further
                                    consideration after the date of such
                                    termination. If terminated by the Company
                                    without Cause, by the Executive for Good
                                    Reason, or if this Agreement is not renewed
                                    by the Company upon expiration of the
                                    Initial Term, Executive shall be entitled
                                    to severance in an amount equal to 18
                                    months' base salary (based upon the base
                                    salary then in effect) payable monthly in
                                    arrears, plus the pro rated portion of any
                                    quarterly bonus that would be payable in
                                    respect of the quarter during which
                                    Executive is terminated, plus any Special
                                    Cash Bonuses earned, but not paid, in
                                    respect of any fiscal years ending prior to
                                    the termination of employment, in each case
                                    payable at the time such bonus otherwise
                                    would have been payable in accordance with
                                    past practice, plus accrued benefits (if
                                    any). "Cause" means (a) a conviction of a
                                    crime (other than minor traffic offenses
                                    and the like), (b) the Executive breaches
                                    any obligations under the
                                    non-competition/non-solicitation agreement
                                    entered into concurrently herewith (and
                                    fails to cure the breach within 30 days
                                    after notice), (c) the employee engages in
                                    dishonesty or fraud, (d) the employee is
                                    physically able to perform his duties and
                                    services but refuses to do so, or (e) the
                                    employee engages in gross negligence or
                                    willful misconduct injurious to the
                                    Company, Cooperative Computing Holding
                                    Company, Inc. ("Holdings") or their
                                    respective subsidiaries. "Good Reason"
                                    shall mean (a) any breach by the Company of
                                    its obligations hereunder, (b) any
                                    significant reduction, approved by the
                                    Board without Executive's written


                                       3
   5

                                    consent, in the Executive's title, duties
                                    or responsibilities other than for Cause
                                    (unless in the case of either clause (a) or
                                    (b) the Executive has notified the Company
                                    within 30 days after the occurrence of such
                                    event and the Company has cured such event
                                    within 30 days after receipt of such
                                    notice) or (c) Executive is required to
                                    relocate without his consent to an area
                                    that is outside a 50 mile radius of Austin,
                                    Texas.

         RELOCATION:                Executive will permanently relocate to
                                    Austin, Texas prior to December 31, 1999
                                    (the "Relocation Date"). The Company will
                                    reimburse the Executive for normal and
                                    customary relocation expenses, including
                                    travel for housing searches, commuting to
                                    Austin, Texas prior to relocation through
                                    the earlier of his relocation or the
                                    Relocation Date, closing costs on the sale
                                    of Executive's existing residence, closing
                                    costs on the purchase of the Executive's
                                    residence in Austin, Texas, moving
                                    expenses, and temporary living expenses
                                    prior to closing on Executive's residence
                                    in Austin, Texas. All expenses reimbursed
                                    will be grossed up for United States
                                    federal income tax purposes.

         STOCK OPTIONS:             Executive will be granted, as of the
                                    effective time of Executive's employment
                                    with the Company, options (the "Options")
                                    to purchase an aggregate of 500,000 shares
                                    of Common Stock, par value $.000125 per
                                    share ("Common Stock"), of Holdings. The
                                    Options will be evidenced by a separate
                                    option agreement to be entered into and
                                    will be granted pursuant to, and subject to
                                    the terms of (except for those terms
                                    outlined below), Holdings' 1998 Stock
                                    Option Plan. The Options will be
                                    exercisable at $5.00 per share and will
                                    vest and become exercisable, except as
                                    provided below, in three equal annual
                                    installments commencing on the first
                                    anniversary of the effective time of
                                    Executive's employment. Notwithstanding the
                                    foregoing, the Options will fully vest and
                                    become exercisable upon the occurrence of a
                                    Change of Control (as defined). "Change of
                                    Control" shall have the meaning given that
                                    term in the 1998 Stock Option Plan, which
                                    as so defined generally means the first to
                                    occur of the following events: (a) any
                                    sale, lease, exchange, or other transfer
                                    (in one transaction or a series of related
                                    transactions) of all or substantially all
                                    of the assets of Holdings to any Person or
                                    group of related Persons for purposes of
                                    Section 13(d) of the Securities Exchange
                                    Act of 1934, other than to one or more


                                       4
   6

                                    members of the Shareholder Group (as
                                    defined in the 1998 Stock Option Plan), (b)
                                    a majority of the Board of Directors of
                                    Holdings shall consist of Persons who are
                                    not Continuing Directors (as defined in the
                                    1998 Stock Option Plan), or (c) the
                                    acquisition by any Person or group of
                                    Persons (other than one or more members of
                                    the Shareholder Group) of the power,
                                    directly or indirectly, to vote securities
                                    having more than 50% of the ordinary voting
                                    power for the election of directors of
                                    Holdings.

         NO MITIGATION:             Executive's severance payments will not be
                                    subject to mitigation as a result of any
                                    employment or other compensation received
                                    by Executive after termination of his
                                    employment.

         GOVERNING LAW:             Governed by Texas law, without regard to
                                    principles of conflicts of laws.


                                       5