<PAGE>

                                                                   Exhibit 10.40

                                    GUARANTY

TO:   DEUTSCHE FINANCIAL SERVICES CORPORATION

      In consideration of financing provided or to be provided by you to Comteq
Federal, Inc. ("Dealer"), and for other good and valuable consideration
received, we jointly, severally, unconditionally and absolutely guaranty to you,
from property held separately, jointly or in community, the immediate payment
when due of all current and future liabilities owed by Dealer to you, whether
such liabilities are direct, indirect or owed by Dealer to a third party and
acquired by you (and, with respect to such liabilities owed by Dealer to a third
party and acquired by you, to the extent the guaranty by the undersigned is
reaffirmed in writing) ("Liabilities"). We will pay you on demand the full
amount of all sums owed by Dealer to you, together with all reasonable costs and
expenses (including, without limitation, reasonable attorneys' fees). We also
indemnify and hold you harmless from and against all (a) losses, costs and
expenses you incur and/or are liable for (including, without limitation,
reasonable attorneys' fees) and (b) claims, actions and demands made by Dealer
or any third party against you, which in any way relate to any relationship or
transaction between you and Dealer.

      Our guaranty will not be released, discharged or affected by, and we
hereby irrevocably consent to, any: (a) change in the manner, place, interest
rate, finance or other charges, or terms of payment or performance in any
current or future agreement between you and Dealer, the release, settlement or
compromise of or with any party liable for the payment or performance thereof or
the substitution, release, non-perfection, impairment, sale or other disposition
of any collateral thereunder; (b) change in Dealer's financial condition; (c)
interruption of relations between Dealer and you or us; (d) claim or action by
Dealer against you; and/or (e) increases or decreases in any credit you may
provide to Dealer. We will pay you even if you have not exercised any of your
rights or remedies against Dealer, any other person or any current or future
collateral. This Guaranty is assignable by you and will inure to the benefit of
your assignee. If Dealer hereafter undergoes any change in its ownership,
identity or organizational structure, this Guaranty will extend to all current
and future obligations which such new or changed legal entity owes to you.

      We irrevocably waive (to the extent permitted by law): notice of your
acceptance of this Guaranty, presentment, demand, protest, nonpayment,
nonperformance, notice of breach or default, notice of intent to accelerate and
notice of acceleration of any indebtedness of Dealer, any right of contribution
from other guarantors, dishonor, the amount of indebtedness of Dealer
outstanding at any time, the number and amount of advances made by you to Dealer
in reliance on this Guaranty and any claim or action against Dealer; all other
demands and notices required by law; all rights of offset and counterclaims
against you or Dealer; all defenses to the enforceability of this Guaranty
(including, without limitation, fraudulent inducement). We further waive (to the
extent permitted by law) all defenses based on suretyship or impairment of
collateral, and defenses which the Dealer may assert on the underlying debt,
including but not limited to, failure of consideration, breach of warranty,
fraud, statute of frauds, bankruptcy, lack of legal capacity, lender liability,
deceptive trade practices and usury. We also waive all rights to claim,
arbitrate for or sue for any punitive or exemplary damages. In addition, we
hereby irrevocably subordinate to you any and all of our present and future
rights and remedies: (a) of subrogation against Dealer to any of your rights or
remedies against Dealer; (b) of contribution, reimbursement, indemnification and
restoration from Dealer; and (c) to assert any other claim or action against
Dealer directly or indirectly relating to this Guaranty, such subordinations to
last until you have been paid in full for all Liabilities. All of our waivers
and subordinations herein will survive any termination of this Guaranty.

      We have made an independent investigation of the financial condition of
Dealer and give this Guaranty based on that investigation and not upon any
representation made by you. We have access to current and future Dealer
financial information which enables us to remain continuously informed of
Dealer's financial condition. We represent and warrant to you that we have
received and will receive substantial direct or indirect benefit by making this
Guaranty and incurring the Liabilities. We will provide you with
<PAGE>

consolidated financial statements on us and our subsidiaries each year within
ninety (90) days after the end of our fiscal year end. We warrant and represent
to you that all financial statements and information relating to us or Dealer
which have been or may hereafter be delivered by us or Dealer to you are true
and correct and have been and will be prepared in accordance with generally
accepted accounting principles consistently applied and, with respect to
previously delivered statements and information, there has been no material
adverse change in the financial or business condition of us or Dealer since the
submission to you, either as of the date of delivery, or if different, the date
specified therein, and we acknowledge your reliance thereon. This Guaranty will
survive any federal and/or state bankruptcy or insolvency action involving
Dealer. We are solvent and our execution of this Guaranty will not make us
insolvent. If you are required in any action involving Dealer to return or
rescind any payment made to or value received by you from or for the account of
Dealer, this Guaranty will remain in full force and effect and will be
automatically reinstated without any further action by you and notwithstanding
any termination of this Guaranty or your release of us. Any delay or failure by
you, or your successors or assigns, in exercising any of your rights or remedies
hereunder will not waive any such rights or remedies. Oral agreements or
commitments to loan money, extend credit or to forbear from enforcing repayment
of a debt including promises to extend or renew such debt are not enforceable.
To protect us and you from misunderstanding or disappointment, any agreements we
reach covering such matters are contained in this writing, which is the complete
and exclusive statement of the agreement between us, except as specifically
provided herein or as we may later agree in writing to modify it.
Notwithstanding anything herein to the contrary: (a) you may rely on any
facsimile copy, electronic data transmission or electronic data storage of this
Guaranty, any agreement between you and Dealer, any Statement of Transaction,
billing statement, invoice from a vendor, financial statements or other report,
and (b) such facsimile copy, electronic data transmission or electronic data
storage will be deemed an original, and the best evidence thereof for all
purposes, including, without limitation, under this Guaranty or any other
agreement between you and us, and for all evidentiary purposes before any
arbitrator, court or other adjudicatory authority. We may terminate this
Guaranty by a written notice to you, the termination to be effective forty-five
(45) days after you receive and acknowledge it, but the termination will not
terminate our obligations hereunder for Liabilities arising prior to the
effective termination date. We have read and understood all terms and provisions
of this Guaranty. We acknowledge receipt of a true copy of this Guaranty and of
all agreements between you and Dealer. The meanings of all terms herein are
equally applicable to both the singular and plural forms of such terms.

      BINDING ARBITRATION. Except as otherwise specified below, all actions,
disputes, claims and controversies under common law, statutory law or in equity
of any type or nature whatsoever (including, without limitation, all torts,
whether regarding negligence, breach of fiduciary duty, restraint of trade,
fraud, conversion, duress, interference, wrongful replevin, wrongful
sequestration, fraud in the inducement, usury or any other tort, all contract
actions, whether regarding express or implied terms, such as implied covenants
of good faith, fair dealing, and the commercial reasonableness of any collateral
disposition, or any other contract claim, all claims of deceptive trade
practices or lender liability, and all claims questioning the reasonableness or
lawfulness of any act), whether arising before or after the date of this
Guaranty, and whether directly or indirectly relating to: (a) this Guaranty
and/or any amendments and addenda hereto or the breach, invalidity or
termination hereof; (b) any previous or subsequent agreement between you and us;
(c) any act committed by you or by any parent company, subsidiary or affiliated
company of you (the "DFS Companies"), or by an employee, agent, officer or
director of a DFS Company, whether or not arising within the scope and course of
employment or other contractual representation of the DFS Companies provided
that such act arises under a relationship, transaction or dealing between you
and Dealer or you and us; and/or (d) any other relationship, transaction,
dealing or agreement between you and Dealer or you and us (collectively the
"Disputes"), will be subject to and resolved by binding arbitration.

      All arbitration hereunder will be conducted in accordance with The
Commercial Arbitration Rules of The American Arbitration Association ("AAA"). If
the AAA is dissolved, disbanded or becomes subject to any state or federal
bankruptcy or insolvency proceeding, the parties will remain subject to binding
arbitration which will be conducted by a mutually agreeable arbitral forum. The
parties agree that all
<PAGE>

arbitrator(s) selected will be attorneys with at least five (5) years secured
transactions experience. The arbitrator(s) will decide if any inconsistency
exists between the rules of any applicable arbitral forum and the arbitration
provisions contained herein. If such inconsistency exists, the arbitration
provisions contained herein will control and supersede such rules. The site of
all arbitrations will be in the Division of the Federal Judicial District in
which AAA maintains a regional office that is closest to Dealer.

      Discovery permitted in any arbitration proceeding commenced hereunder is
limited as follows: No later than sixty (60) days after the filing of a claim
for arbitration, the parties will exchange detailed statements setting forth the
facts supporting the claim(s) and all defenses to be raised during the
arbitration, and a list of all exhibits and witnesses. No later than twenty-one
(21) days prior to the arbitration hearing, the parties will exchange a final
list of all exhibits and all witnesses, including any designation of any expert
witness(es) together with a summary of their testimony; a copy of all documents
and a detailed description of any property to be introduced at the hearing.
However, in the event of the designation of any expert witness(es), the
following will occur: (a) all information and documents relied upon by the
expert witness(es) will be delivered to the opposing party, (b) the opposing
party will be permitted to depose the expert witness(es), (c) the opposing party
will be permitted to designate rebuttal expert witness(es), and (d) the
arbitration hearing will be continued to the earliest possible date that enables
the foregoing limited discovery to be accomplished.

      The Arbitrator(s) will not have the authority to award exemplary or
punitive damages.


      All arbitration proceedings, including testimony or evidence at hearings,
will be kept confidential, although any award or order rendered by the
arbitrator(s) pursuant to the terms of this Guaranty may be entered as a
judgment or order in any state or federal court and may be entered as a judgment
or order within the federal judicial district which includes the residence of
the party against whom such award or order was entered. This Guaranty concerns
transactions involving commerce among the several states. The Federal
Arbitration Act ("FAA") will govern all arbitration(s) and confirmation
proceedings hereunder.

      Nothing herein will be construed to prevent your or our use of bankruptcy,
receivership, injunction, repossession, replevin, claim and delivery,
sequestration, seizure, attachment, foreclosure, dation and/or any other
prejudgment or provisional action or remedy relating to any collateral for any
current or future debt owed by either party to the other. Any such action or
remedy will not waive your or our right to compel arbitration of any Dispute.

      If either we or you bring any other action for judicial relief with
respect to any Dispute (other than those set forth in the immediately preceding
paragraph), the party bringing such action will be liable for and immediately
pay all of the other party's reasonable costs and expenses (including attorneys'
fees) incurred to stay or dismiss such action and remove or refer such Dispute
to arbitration. If either we or you bring or appeal an action to vacate or
modify an arbitration award and such party does not prevail, such party will pay
all reasonable costs and expenses, including reasonable attorneys' fees,
incurred by the other party in defending such action.

      Any arbitration proceeding must be instituted: (a) with respect to any
Dispute for the collection of any debt owed by either party to the other, within
two (2) years after the date the last payment was received by the instituting
party; and (b) with respect to any other Dispute, within two (2) years after the
date the incident giving rise thereto occurred. Failure to institute an
arbitration proceeding within such period will constitute an absolute bar and
waiver to the institution or any proceeding with respect to such Dispute. Except
as otherwise stated herein, all notices, arbitration claims, responses, requests
and documents will be sufficiently given or served if mailed or delivered: (i)
to us at our address below; (ii) to you at 655 Maryville Centre Drive, St.
Louis, Missouri 63141-5832. Attention: General Counsel; or such other address as
the parties may specify from time to time in writing.
<PAGE>

      The agreement to arbitrate will survive the termination of this Guaranty.

      IF THIS GUARANTY IS FOUND TO BE NOT SUBJECT TO ARBITRATION, ANY LEGAL
PROCEEDING WITH RESPECT TO ANY DISPUTE WILL BE TRIED IN A COURT OF COMPETENT
JURISDICTION BY A JUDGE WITHOUT A JURY. WE WAIVE ANY RIGHT TO A JURY TRIAL IN
ANY SUCH PROCEEDING.

      We acknowledge and agree that this Guaranty and all agreements between
Dealer and you have been substantially negotiated, and will be performed, in the
state of Massachusetts. Accordingly, we agree that all Disputes will be governed
by, and construed in accordance with, the laws of such state, except to the
extent inconsistent with the provisions of the FAA which will control and govern
all arbitration proceedings hereunder.

THIS GUARANTY CONTAINS BINDING ARBITRATION, JURY WAIVER AND PUNITIVE DAMAGES
WAIVER PROVISIONS.

Date: 2/25, 2000

CORPORATE, PARTNERSHIP OR
LIMITED LIABILITY COMPANY
GUARANTOR:

PC Connection, Inc.

By: /s/ Mark Gavin
    -----------------------------
Print Name: Mark Gavin
            ---------------------
Title: CFO
       --------------------------

By:
    -----------------------------
Print Name:
            ---------------------
Title:
       --------------------------

Address of Guarantor(s):

     Route 101A
     730 Milford Road
     Merrimack, NH 03054-4631
<PAGE>

      The agreement to arbitrate will survive the termination of this Guaranty.

      IF THIS GUARANTY IS FOUND TO BE NOT SUBJECT TO ARBITRATION, ANY LEGAL
PROCEEDING WITH RESPECT TO ANY DISPUTE WILL BE TRIED IN A COURT OF COMPETENT
JURISDICTION BY A JUDGE WITHOUT A JURY. WE WAIVE ANY RIGHT TO A JURY TRIAL IN
ANY SUCH PROCEEDING.

      We acknowledge and agree that this Guaranty and all agreements between
Dealer and you have been substantially negotiated, and will be performed, in the
state of Massachusetts. Accordingly, we agree that all Disputes will be governed
by, and construed in accordance with, the laws of such state, except to the
extent inconsistent with the provisions of the FAA which will control and govern
all arbitration proceedings hereunder.

THIS GUARANTY CONTAINS BINDING ARBITRATION, JURY WAIVER AND PUNITIVE DAMAGES
WAIVER PROVISIONS.

Date: 2/25, 2000

CORPORATE, PARTNERSHIP OR
LIMITED LIABILITY COMPANY
GUARANTOR:

PC Connection, Inc.

By: /s/ Mark Gavin
    -----------------------------
Print Name: Mark Gavin
            ---------------------
Title: CFO
       --------------------------

By:
    -----------------------------
Print Name:
            ---------------------
Title:
       --------------------------

Address of Guarantor(s):