<PAGE>   1
                                                                    EXHIBIT 10.4


                      AMENDED AND RESTATED PROMISSORY NOTE

$8,703,542.37                                                      July 23, 1998


         FOR VALUE RECEIVED, NATIONAL NETWORK TECHNOLOGIES INC. (successor by
merger to Hugh O'Kane Electric Co. Inc.), a Delaware corporation ("Maker"),
having an office at 88 White Street, New York, New York 10013, promises to pay
to the order of DENIS J. O'KANE ("Payee"), having an address at 201 Sunset Road,
Oyster Bay, New York, 11771, EIGHT MILLION SEVEN HUNDRED THREE THOUSAND FIVE
HUNDRED FORTY-TWO AND 37/100 DOLLARS ($8,703,542.37) with interest on the unpaid
balance hereof from the date of this Promissory Note (the "Note") at the
Interest Rate (as defined in Article I). This Note evidences the purchase price
payable to Payee in respect of the redemption of certain capital stock of Maker
held by Payee. The unpaid principal balance of this Note, together with all
accrued but unpaid interest thereon, and all other sums due hereunder (including
delinquency charges), shall be due and payable on January 1, 2004 or on such
earlier date as may be required under the terms hereof (the "Maturity Date").

                                   ARTICLE I

                             INTEREST AND PRINCIPAL

         A. INTEREST RATE, COMPUTATION AND PAYMENTS. As used herein, "Interest
Rate" means six percent (6%) per annum. Interest shall accrue from the date
hereof and shall be payable (i) quarterly, in arrears, on the first day of each
January, April, July and October commencing on October 1, 1998, (ii) on the
Maturity Date and (iii) on each date on which the principal balance of this Note
is paid in part or in full, or if any such day is not a business day, on the
next succeeding business day. Interest on the unpaid principal balance of this
Note shall be computed on the basis of a 365-(or 366-) day year, as the case may
be, for the number of actual days elapsed.

         B. PRINCIPAL REPAYMENT. This Note shall mature in twenty-two (22)
consecutive quarterly installments of principal, the first twenty-one (21) of
which shall be equal to $395,615.56, payable on the first day of each January,
April, July and October, commencing on October 1, 1998, with the twenty-second
(22nd) and final installment of principal on the Maturity Date of $395,448.61,
or if any such day is not a business day, on the next succeeding business day.

         C. OPTIONAL PREPAYMENTS. Maker may prepay this Note in whole or in
part, without premium or penalty, at any time and from time to time. Optional
prepayments on this Note shall be applied pro rata to the then remaining
installments of principal under this Note.
<PAGE>   2
                                  ARTICLE II

                           EVENTS OF DEFAULT; REMEDIES

         A. EVENTS OF DEFAULT. Any of the following events shall constitute an
"Event of Default" hereunder:

            (i) Maker shall fail to pay when due any payment of principal or
    interest due hereunder in accordance with the terms hereof, and in the case
    of interest, such failure continues for a period of ten business days after
    the date when such payment is due; or

            (ii) Maker shall (a) become insolvent, (b) be dissolved, (c) fail
    generally to pay its debts as such debts income become due, (d) commence a
    voluntary case under federal bankruptcy, insolvency or other similar law,
    (e) consent to the appointment of or taking of possession by a receiver,
    liquidator, assignee, trustee, custodian, or sequestrator (or other similar
    official) of Maker or of any substantial part of its property, (f) make an
    assignment for the benefit of creditors, or (g) take any action intended or
    likely to result in any event described in the foregoing clauses (a) through
    (f) or

            (iii) There shall be filed or entered in respect of Maker a
    petition, decree or order for relief by a court having jurisdiction in the
    premises in an involuntary case under the federal bankruptcy laws, as now or
    hereafter constituted, or any other applicable federal, state or foreign
    bankruptcy, insolvency or other similar law, or appointing a receiver,
    liquidator, assignee, custodian, trustee or sequestrator (or other similar
    official) of Maker or of any substantial part of its property, or ordering
    the winding up or liquidation of its affairs, and any such petition, decree
    or order shall continue undismissed, unstayed and in effect for a period of
    30 days.

         B. REMEDIES. Upon the occurrence of any Event of Default in the case of
Article II(A)(i), above, Payee may, by notice to Maker, declare the unpaid
principal balance hereunder (with accrued interest thereon) and all other
amounts owing under this Note to be due and payable forthwith, whereupon the
same shall immediately become due and payable. Upon the occurrence of any Event
of Default in the case of Articles I(A)(ii) or II(A)(iii) above, the unpaid
principal balance hereunder (with accrued interest thereon) and all other
amounts owing under this Note shall automatically immediately become due and
payable. Except as expressly provided in this Article II(B), presentment,
demand, protest and all other notices of any kind are hereby expressly waived.


                                       2
<PAGE>   3
                                  ARTICLE III

                               GENERAL CONDITIONS

         A. METHOD OF PAYMENT. All payments under this Note shall be made,
without setoff, counterclaim or other defense, by check to Payee at his address
set forth above, or by any other method or to any other place or account
hereafter designated by Payee in writing.

         B. APPLICATION OF PAYMENTS RECEIVED. Except as otherwise provided in
this Note, all payments received by Payee on this Note shall be applied by Payee
as follows:

         FIRST, to the payment of delinquency charges, if any;

         SECOND, to accrued and unpaid interest then due and owing; and

         THIRD, to the reduction of principal of this Note.

         C. DEFAULT INTEREST. If all or a portion of the principal of or
interest on this Note shall not be paid when due (whether at stated maturity, by
acceleration or otherwise), such overdue amount shall bear interest at a rate
per annum which is equal to the Interest Rate plus two percent (2%), from the
date of such non-payment until such overdue amount is paid in full; provided,
however, that if any such default interest is in excess of the amount permitted
to be charged to Maker under applicable federal or state law Payee shall be
entitled to collect default interest at the highest rate permitted by such law.

         D. COST AND EXPENSES ON DEFAULT. If an Event of Default shall have
occurred, Payee shall be entitled to collect, in addition to principal, interest
and delinquency charges hereunder, all costs of collection, including without
limitation, reasonable attorneys' fees, incurred in connection with any of
Payee's collection efforts, whether or not suit on this Note or any foreclosure
proceeding is filed.

         E. NO WAIVER BY PAYEE. No failure on the part of Payee to exercise any
right or remedy hereunder, whether before or after the occurrence of an Event of
Default, shall constitute a waiver thereof, and no waiver of any past default
shall constitute a waiver of any future default or of any other default. No
failure to accelerate the debt evidenced hereby by reason of default hereunder,
acceptance of a past due installment, or indulgence granted from time to time,
shall be construed to be a waiver of the right to insist upon prompt payment
thereafter or to impose delinquency charges retroactively or prospectively,
shall be deemed to be a novation of this Note, shall be construed as a
reinstatement of the debt evidence hereby, as a waiver of Payee's right of
acceleration or as a waiver of any other right, or shall be construed so as to
preclude the exercise of any right which Payee may have, whether by law, by
agreement or otherwise; and Maker and each endorser or guarantor hereby
expressly waives the benefit of any statute or rule


                                       3
<PAGE>   4
of law or equity which would produce a result contrary to or in conflict with
the foregoing. The terms and provisions of this Note may not be amended orally,
but only by an agreement in writing signed by the parties hereto.

         F. WAIVER BY MAKER. Maker hereby waives presentment, protest, demand,
diligence, notice of dishonor and of nonpayment.

         G. SUCCESSORS AND ASSIGNS. This Note shall be binding upon and inure to
the benefit of Payee, Maker and their respective successors, assigns, heirs and
estates, except that Payee may not assign or transfer any of his rights or
obligations under this Note without the prior written consent of Maker, which
consent shall not be unreasonably withheld.


                                  ARTICLE IV

                                  SUBORDINATION

         A. NOTE SUBORDINATED TO SENIOR DEBT.

            (i) Maker, for itself and its successors, and Payee, by his
    acceptance of this Note, agrees that all payments under this Note
    ("Subordinated Obligations") are subordinated, to the extent and in the
    manner provided in this Article IV, to the prior payment in full in cash of
    all Senior Debt.

            (ii) This Article IV shall constitute a continuing offer to all
    persons who, in reliance upon such provisions, become holders of, or
    continue to hold, Senior Debt, and such provisions are made for the benefit
    of the holders of Senior Debt, and such holders are made obligees hereunder
    and any one or more of them may enforce such provisions. The provisions of
    this Article IV shall be reinstated if at any time any payment of the Senior
    Debt is rescinded or must otherwise be returned by any holder thereof or any
    representative of such holder upon the insolvency, bankruptcy or
    reorganization of Maker. (a) For purposes hereof, "Senior Debt" means all
    indebtedness other than such indebtedness specified as junior or pari passu,
    for the purposes of priority, to this Note; and (b) "Senior Debtholders"
    means the holders from time to time of any of the Senior Debt.

         B. NOTE SUBORDINATED TO PRIOR PAYMENT OF ALL SENIOR DEBT ON
DISSOLUTION, LIQUIDATION OR REORGANIZATION. Upon any payment or distribution of
properties of Maker or any successor in any dissolution, winding up, liquidation
or reorganization of Maker (including in bankruptcy, insolvency or receivership
proceedings or upon any assignment for the benefit of creditors, whether
voluntary or involuntary):


                                       4
<PAGE>   5
            (i) The holders of all Senior Debt shall first be entitled to
    receive payments in full of all amounts due on or with respect to Senior
    Debt, including the principal, premium, and interest, fees, expenses and
    costs due thereon or relating thereto, including any interest accruing
    subsequent to a bankruptcy or other similar proceeding at the rate specified
    in the applicable Senior Debt whether or not such interest is an allowed
    claim enforceable against Maker in any such proceeding, before Payee is
    entitled to receive any payment or distribution in cash, securities or other
    property on account of the Subordinated Obligations (other than any payment
    or distribution in the form of securities, the payment of which (a) is
    subordinated in right of payment to all Senior Debt that may at the time be
    outstanding to the same extent as or to a greater extent than, the
    Subordinated Obligations are subordinate to the Senior Debt as provided in
    this Article and (b) is not payable prior to the payment in full of the
    Senior Debt).

            (ii) Any payment or distribution, whether in cash, cash equivalents,
    property or securities, to which Payee would be entitled except for the
    provisions of this Article IV, shall be paid by the liquidating trustee or
    agent or other person making such a payment or distribution, directly to the
    holders of Senior Debt (or their representative) ratably according to the
    respective amounts of Senior Debt held or represented by each, to the extent
    necessary to make payment in full in cash of all Senior Debt remaining
    unpaid after giving effect to any concurrent payment or distribution or
    provision therefor to the holders of such Senior Debt.

            (iii) In the event that, notwithstanding the foregoing, any payment
    or distribution, whether in cash, cash equivalents property or securities
    (other than any payment or distribution in the form of securities, the
    payment of which (a) is subordinated in right of payment to all Senior Debt
    that may at the time be outstanding to the same extent as, or to a greater
    extent than, the Subordinated Obligations are subordinate to the Senior
    r represented by each, for application to the payment of all Senior Debt
    remaining unpaid to the extent necessary to indefeasibly pay all Senior Debt
    in full in accordance with its terms, after giving effect to any concurrent
    payment or distribution or provision therefor to or for the Senior
    Debtholders.

         C. PAYMENTS OTHERWISE PERMITTED. Nothing contained herein shall prevent
Maker, at any time except during any dissolution, liquidation, winding up, or
reorganization of Maker referred to in Article IV(B), above, or under the
conditions described in Article IV(B), above, from making payments at any time
with respect to the Subordinated Obligations in accordance with terms hereof
(including, without limitation, Article IV(G)).


                                       5
<PAGE>   6
         D. SUBROGATION. Subject to the payment in full in cash of all Senior
Debt, Payee shall be subrogated to the rights of the Senior Debtholders to
receive payments or distributions of properties of Maker applicable to the
Senior Debt until all amounts due and payable on the Subordinated Obligations
shall be paid in full. For the purpose of such subrogation, no payments or
distributions to the Senior Debtholders by or on behalf of Maker, or by or on
behalf of Payee by virtue of this Article IV(D) , which otherwise would have
been made to Payee shall, as between Maker, its creditors other than the Senior
Debtholders and Payee, be deemed to be payment by Maker to or on account of the
Senior Debt, it being understood that the provisions of this Article IV(D) are,
and are intended, solely for the purpose of defining the relative rights of
Payee, on the one hand, and Senior Debtholders, on the other hand.

         E. OBLIGATIONS OF MAKER UNCONDITIONAL. Nothing contained in this
Article IV or elsewhere in this Note is intended to or shall impair, as between
Maker, its creditors (other than the Senior Debtholders) and Payee the
obligations of Maker, which are absolute and unconditional, to pay to Payee the
Subordinated Obligations when the same become due and payable in accordance with
their terms, or is intended to or shall affect the relative rights of Payee and
creditors of Maker other than the Senior Debtholders, nor shall anything herein
or therein prevent Payee from exercising all remedies otherwise permitted by
applicable law upon default hereunder, subject to the rights, if any, and the
limitations on remedies provided in this Article IV of the holders of Senior
Debt. Notwithstanding anything herein to the contrary, upon any distribution of
properties of Maker referred to in this Article IV, Payee shall be entitled to
rely upon any judgment made by any court of competent jurisdiction in which such
dissolution, winding up, liquidation or reorganization proceedings are pending,
or a certificate of the liquidating trustee or agent or other person making any
distribution to Payee, for the purpose of ascertaining the persons entitled to
participate in such distribution, the Senior Debtholders and other obligations
of Maker, the amount thereof or payable thereon, the amount or amounts paid or
distributed heron and all other facts pertinent thereto or to this Article IV.

         F. NOTICE TO PAYEE. Notwithstanding the provisions of this Article IV
or any other provisions of this Note, Payee shall not be charged with knowledge
of the existence of any facts that would prohibit the making of any payment in
respect of the Subordinated Obligations, unless and until Payee shall have
actual knowledge thereof; and, prior to the receipt of any written notice
thereof from Maker or a Senior Debtholder or from any trustee, fiduciary or
agent therefor, Payee shall be entitled in all respects to assume that no such
facts exist. Payee shall be entitled to rely on the delivery to it of a written
notice by any person or entity representing itself to be a Senior Debtholder (or
trustee, fiduciary or agent therefor). In the event that Payee determines in
good faith that further evidence is required with respect to the right of any
person or entity as a Senior Debtholder may request such person or entity to
furnish evidence to the reasonable satisfaction of Payee to participate in any
payment or distribution pursuant to this Article IV, Payee may request such
person or entity to furnish evidence to the reasonable satisfaction of Payee as
to the amount of Senior Debt held by such person or entity, the extent to which
such person or entity is entitled to participate in such payment or distribution
and any other facts pertinent to the rights of such person or entity under this
Article IV and if such evidence is


                                       6
<PAGE>   7
not furnished, Payee may defer any payment to such person or entity pending
judicial determination as to the right of such person or entity to receive such
payment.

         G. NO PAYMENT ON NOTE IN CERTAIN CIRCUMSTANCES.

            (i) In the event that any payment of principal of, or interest on,
    the Senior Debt is not paid when due, whether at stated maturity, by
    mandatory prepayment, by acceleration or otherwise (each a "Senior Debt
    Payment Default"), and the holders of Senior Debt or their agent shall have
    given written notice to Maker and Payee of such non-payment (a "Payment
    Default Notice"), then no payment shall be made by Maker, or accepted by
    Payee, on account of the Subordinated Obligations unless and until such
    payment shall have been made or such Senior Debt Payment Default is waived
    in accordance with the terms of the applicable documents or instruments
    evidencing the Senior Debt (the "Senior Credit Documents").

            (ii) In the event that any default under or in respect of the Senior
    Debt that entitles any holders of any Senior Debt to accelerate the maturity
    of such Senior Debt outstanding thereunder (other than a Senior Debt Payment
    Default) (each, a "Senior Debt Non-Payment Default") shall have occurred and
    be continuing and Maker and Payee shall have received written notice of such
    Senior Debt Non-Payment Default from the holders of any Senior Debt or any
    agent of such holder (a "Payment Blockage Notice"), then no payment shall be
    made by Maker, or accepted by Payee, on account of the Subordinated
    Obligations during the period (a "Payment Blockage Period") commencing on
    the date Maker and Payee received such Payment Blockage Notice and ending on
    the earlier of (a) the date one hundred and twenty (120) days thereafter and
    (b) the date on which the Senior Debt Non-Payment Default giving rise to the
    Payment Blockage Period is cured or waived in accordance with the terms of
    the applicable Senior Credit Documents; provided that no Senior Debt
    Non-Payment default or event which, with the giving of notice and/or the
    lapse of time, would become a Senior Debt Non-Payment Default which existed
    on the date of the commencement of any such blockage period may be used as
    the basis for any subsequent Payment Blockage Notice unless such Senior Debt
    Non-Payment Default or event, as the case may be, shall in the interim have
    been cured or waived for a period of not less than ninety (90) consecutive
    days.

            (iii) The failure to make any payment with respect to the
    Subordinated Obligations by reason of the provisions of Article IV(G)(i) or
    Article IV(G)(ii), shall not be construed as preventing the occurrence of an
    Event of Default hereunder or impairing the right to declare due and payable
    the principal amount of and premium on this Note, plus accrued but unpaid
    interest, subject to Article IV(G)(v).

            (iv) In the event that, notwithstanding the foregoing provisions of
    this Article IV(G), any payment on account of principal of, premium,
    interest on this Note shall be made by or on behalf of Maker and received by
    Payee at a time when such


                                       7
<PAGE>   8
    payment was prohibited by the provisions of this Article IV(G), then, unless
    and until such payment is no longer prohibited by this Article IV(G), such
    payment shall be received and held in trust by Payee for the benefit of,
    and, if any of the Senior Debt remains outstanding, shall be immediately
    paid over to, either Maker or the Senior Debtholders (or their
    representatives) ratably according to the respective amounts of Senior Debt
    held or represented by each, for application to the payment of all Senior
    Debt remaining unpaid to the extent necessary to indefeasibly pay all Senior
    Debt in full in accordance with its terms, after giving effect to any
    concurrent payment or distribution or provision therefor to or for the
    Senior Debtholders. The provisions of this Article IV(G)(iv) shall not apply
    to any payment with respect to which Article IV(G)(v) would be applicable.

            (v) Notwithstanding anything contained herein to the contrary,
    during any period commencing on the date of receipt of a Payment Default
    Notice under Article IV(G)(i) or a Payment Blockage Notice under Article
    IV(G)(ii) and ending on the earlier of (X) the date the default that is the
    subject of such Payment Default Notice or Payment Blockage Notice, as the
    case may be, is cured or waived or (Y) ninety (90) days after receipt by
    Maker of such Payment Default Notice or one hundred and eighty (180) days
    after the receipt by Payee of such Payment Blockage Notice, Payee shall not
    (i) accelerate this Note as provided in Article II(B), (ii) initiate any
    judicial proceeding or action to collect this Note or (iii) initiate any
    case, proceeding or other action in respect of Maker of the type referred to
    in clause (ii) or (iii) of Article II(A) unless, prior to the expiration of
    such period, (A) any holder of the Senior Debt or its agent shall take any
    action of the type referred to in clauses (i), (ii) and (iii) above in
    respect of Senior Debt or (B) any Senior Debt shall have become
    automatically due and payable in accordance with its terms.

            (vi) Prior to taking any action of the type referred to in clauses
    (i), (ii) and (ii) of Article IV(G)(v), Maker shall give the agent for the
    holders of any Senior Debt of which it is actually aware not less than five
    Business Days' notice of Maker's intent to take any such action (which
    notice may be given during the continuation of any period during which Payee
    is blocked from receiving payments under this Article IV(G)).

         H. GOVERNING LAW; SUBMISSION TO JURISDICTION. THIS NOTE SHALL BE
GOVERNED BY AND CONSTRUED UNDER THE LAWS OF THE STATE OF NEW YORK (THE "STATE").
MAKER HEREBY SUBMITS TO PERSONAL JURISDICTION IN THE STATE FOR THE ENFORCEMENT
OF MAKER'S OBLIGATIONS HEREUNDER, AND WAIVES ANY AND ALL PERSONAL RIGHTS UNDER
THE LAW OF ANY OTHER STATE TO OBJECT TO JURISDICTION WITHIN THE STATE FOR THE
PURPOSES OF LITIGATION TO ENFORCE SUCH OBLIGATIONS OF MAKER. IN THE EVENT SUCH
LITIGATION IS COMMENCED, MAKER AGREES THAT SERVICE OF PROCESS MAY BE MADE, AND
PERSONAL JURISDICTION OVER MAKER OBTAINED, BY MAILING A COPY OF THE SUMMONS,
COMPLAINT AND OTHER PLEADINGS REQUIRED TO COMMENCE SUCH LITIGATION TO MAKER AT
ITS ADDRESS LISTED ABOVE.


                                       8
<PAGE>   9
         I. AMENDMENT AND RESTATEMENT. This Note amends and restates that
certain Promissory Note made by Maker in favor of Payee, dated January 1, 1997
(the "Existing Note"), in the amount of $10,210,000, and is given as a
continuation and rearrangement of, and not a novation, release or satisfaction
of, the Existing Note.

         IN WITNESS WHEREOF, Maker has caused this instrument to be duly
executed as of the date first above written.


                                   NATIONAL NETWORK TECHNOLOGIES INC.



                                   By   /s/ Hugh O'Kane, Jr.
                                        ---------------------------
                                        Name:   Hugh O'Kane, Jr.
                                        Title:  President


                                       9