EXHIBIT 4.2 GUARANTY GUARANTY (this "Guaranty"), dated as of September 13, 2002, made by each of the parties listed on the signature pages hereof (collectively, the "Guarantors", and each, a "Guarantor"), in favor of the Guarantied Parties referred to below. WITNESSETH: WHEREAS, NCI Building Systems, Inc. a Delaware corporation (the "Borrower"), has entered into a Credit Agreement, dated as of September 13, 2002, among the Lenders party thereto, Bank of America, N.A., as the Administrative Agent, Swing Line Lender and L/C Issuer (hereinafter, the "Administrative Agent") for the Lenders, and Wachovia Bank, N.A. as Syndication Agent, (said Credit Agreement, as it may be amended, supplemented or otherwise modified from time to time, being the "Credit Agreement", and capitalized terms not defined herein but defined therein being used herein as therein defined); and WHEREAS, the Borrower and each of the Guarantors are members of the same consolidated group of companies and are engaged in operations which require financing on a basis in which credit can be made available from time to time to the Borrower and the Guarantors, and the Guarantors will derive direct and indirect economic benefit from the Revolving Loans, Term Loans, Swing Line Loans and Letters of Credit under the Credit Agreement; and WHEREAS, it is a condition precedent to the obligation of the Lenders to make Revolving Loans, Term Loans and Swing Line Loans and issue Letters of Credit under the Credit Agreement that the Guarantors shall have executed and delivered this Guaranty; and WHEREAS, the Lenders, the Administrative Agent and any Affiliate of any Lender entering into a Swap Contract (provided that such Lender was a Lender at the time such Swap Contract was entered into) with the Borrower or any Affiliate of the Borrower are herein referred to as the "Guarantied Parties"; NOW, THEREFORE, in consideration of the premises and to induce the Lenders to make Revolving Loans and Term Loans, the Swing Line Lender to make Swing Line Loans and the L/C Issuer to issue Letters of Credit, the Guarantors hereby agree as follows: SECTION 1. Guaranty. The Guarantors hereby jointly and severally unconditionally and irrevocably guarantee the full and prompt payment when due, whether at stated maturity, by acceleration or otherwise, of, and the performance of, (a) the Obligations (excluding obligations arising under any Swap Contract to which an Affiliate of any Lender is a party that was entered into prior to the time such Lender became a Lender), whether now or hereafter existing and whether for principal, interest, fees, expenses or otherwise, (b) any and all reasonable out-of-pocket expenses (including, without limitation, reasonable expenses and reasonable counsel fees and expenses of the Administrative Agent and the Lenders) incurred by any of the Guarantied Parties in enforcing any rights under this Guaranty and (c) all present and future amounts that would become due but for the operation of any provision of Debtor Relief Laws, and all present 1 and future accrued and unpaid interest, including, without limitation, all post-petition interest if the Borrower or any Guarantor voluntarily or involuntarily becomes subject to any Debtor Relief Laws (the items set forth in clauses (a), (b) and (c) immediately above being herein referred to as the "Guarantied Obligations"). Upon failure of the Borrower to pay any of the Guarantied Obligations when due after the giving by the Administrative Agent and/or the Lenders of any notice and the expiration of any applicable cure period in each case provided for in the Credit Agreement and other Loan Documents (whether at stated maturity, by acceleration or otherwise), the Guarantors hereby further jointly and severally agree to promptly pay the same after the Guarantors' receipt of notice from the Administrative Agent of the Borrower's failure to pay the same, without any other demand or notice whatsoever, including without limitation, any notice having been given to any Guarantor of either the acceptance by the Guarantied Parties of this Guaranty or the creation or incurrence of any of the Obligations. This Guaranty is an absolute guaranty of payment and performance of the Guarantied Obligations and not a guaranty of collection, meaning that it is not necessary for the Guarantied Parties, in order to enforce payment by the Guarantors, first or contemporaneously to accelerate payment of any of the Guarantied Obligations, to institute suit or exhaust any rights against any Loan Party, or to enforce any rights against any Collateral. Notwithstanding anything herein or in any other Loan Document to the contrary, in any action or proceeding involving any state corporate law, or any state or federal bankruptcy, insolvency, reorganization or other law affecting the rights of creditors generally, if, as a result of applicable law relating to fraudulent conveyance or fraudulent transfer, including Section 548 of Bankruptcy Code or any applicable provisions of comparable state law (collectively, "Fraudulent Transfer Laws"), the obligations of any Guarantor under this Section 1 would otherwise, after giving effect to (a) all other liabilities of such Guarantor, contingent or otherwise, that are relevant under such Fraudulent Transfer Laws (specifically excluding, however, any liabilities of such Guarantor in respect of intercompany Indebtedness to the Borrower to the extent that such Indebtedness would be discharged in an amount equal to the amount paid by such Guarantor hereunder) and (b) to the value as assets of such Guarantor (as determined under the applicable provisions of such Fraudulent Transfer Laws) of any rights of subrogation, contribution, reimbursement, indemnity or similar rights held by such Guarantor pursuant to (i) applicable requirements of Law, (ii) Section 10 hereof or (iii) any other contractual obligations providing for an equitable allocation among such Guarantor and other Subsidiaries or Affiliates of the Borrower of obligations arising under this Guaranty or other guaranties of the Obligations by such parties, be held or determined to be void, invalid or unenforceable, or subordinated to the claims of any other creditors, on account of the amount of its liability under this Section 1, then the amount of such liability shall, without any further action by such Guarantor, any Lender, the Administrative Agent or any other Person, be automatically limited and reduced to the highest amount that is valid and enforceable and not subordinated to the claims of other creditors as determined in such action or proceeding. SECTION 2. Guaranty Absolute. Each Guarantor guaranties that the Guarantied Obligations will be paid strictly in accordance with the terms of the Credit Agreement, the Notes and the other Loan Documents, without set-off or counterclaim, and regardless of any Applicable Law now or hereafter in effect in any jurisdiction affecting any of such terms or the rights of the Guarantied Parties with respect thereto. The liability of each Guarantor under this Guaranty shall be absolute and unconditional irrespective of: 2 (a) any lack of validity or enforceability of any provision of any other Loan Document or any other agreement or instrument relating to any Loan Document, or avoidance or subordination of any of the Guarantied Obligations; (b) any change in the time, manner or place of payment of, or in any other term of, or any increase in the amount of, all or any of the Guarantied Obligations, or any other amendment or waiver of any term of, or any consent to departure from any requirement of, the Credit Agreement, the Notes or any of the other Loan Documents; (c) any exchange, release or non-perfection of any Lien on any Collateral for, or any release of any other Loan Party or amendment or waiver of any term of any other guaranty of, or any consent to departure from any requirement of any other guaranty of, all or any of the Guarantied Obligations; (d) the absence of any attempt to collect any of the Guarantied Obligations from the Borrower or from any other Loan Party or any other action to enforce the same or the election of any remedy by any of the Guarantied Parties; (e) any waiver, consent, extension, forbearance or granting of any indulgence by any of the Guarantied Parties with respect to any provision of any other Loan Document; (f) the election by any of the Guarantied Parties in any proceeding under any Debtor Relief Law; (g) any borrowing or grant of a security interest by the Borrower, as debtor-in-possession, under any Debtor Relief Law; or (h) any other circumstance which might otherwise constitute a legal or equitable discharge or defense of the Borrower or any Guarantor other than payment or performance of the Obligations. SECTION 3. Waiver. (a) Each Guarantor hereby (i) waives (A) promptness, diligence, and, except as otherwise provided herein, notice of acceptance and any and all other notices, including, without limitation, notice of intent to accelerate and notice of acceleration, with respect to any of the Obligations or this Guaranty, (B) any requirement that any of the Guarantied Parties protect, secure, perfect or insure any security interest in or other Lien on any property subject thereto or exhaust any right or take any action against the Borrower or any other Person or any collateral, (C) the filing of any claim with a court in the event of receivership or bankruptcy of the Borrower or any other Person, (D) except as otherwise provided herein, protest or notice with respect to nonpayment of all or any of the Guarantied Obligations, (E) the benefit of any statute of limitation except as applicable directly to the obligations of such Guarantor under this Guaranty, (F) except as otherwise provided herein, all demands whatsoever (and any requirement that demand be made on the Borrower or any other Person as a condition precedent to such Guarantor's obligations hereunder), (G) all rights by which any Guarantor might be entitled to require suit on an accrued right of action in respect of any of the Guarantied Obligations or 3 require suit against the Borrower or any other Guarantor or Person, whether arising pursuant to Section 34.02 of the Texas Business and Commerce Code, as amended, Section 17.001 of the Texas Civil Practice and Remedies Code, as amended, Rule 31 of the Texas Rules of Civil Procedure, as amended, or otherwise, (H) any defense based upon an election of remedies by any Guarantied Party, or (I) notice of any events or circumstances set forth in clauses (a) through (h) of Section 2 hereof; and (ii) covenants and agrees that, except as otherwise agreed by the parties, this Guaranty will not be discharged except (i) by complete payment and performance of the Guarantied Obligations and any other obligations of such Guarantor contained herein or (ii) as to any Guarantor, upon the sale or other disposition of all of the Stock of such Guarantor as permitted under the Credit Agreement. (b) If, in the exercise of any of its rights and remedies in accordance with the provisions of applicable Law, any of the Guarantied Parties shall forfeit any of its rights or remedies, including, without limitation, its right to enter a deficiency judgment against the Borrower or any other Person, whether because of any Applicable Law pertaining to "election of remedies" or the like, each Guarantor hereby consents to such action by such Guarantied Party and waives any claim based upon such action. Any election of remedies which, by reason of such election, results in the denial or impairment of the right of such Guarantied Party to seek a deficiency judgment against the Borrower shall not impair the obligation of such Guarantor to pay the full amount of the Guarantied Obligations or any other obligation of such Guarantor contained herein. (c) In the event any of the Guarantied Parties shall bid at any foreclosure or trustee's sale or at any private sale permitted by law or under any of the Loan Documents, to the extent not prohibited by Applicable Law, such Guarantied Party may bid all or less than the amount of the Guarantied Obligations and the amount of such bid, if successful, need not be paid by such Guarantied Party but shall be credited against the Guarantied Obligations. (d) Each Guarantor agrees that notwithstanding the foregoing and without limiting the generality of the foregoing if, after the occurrence and during the continuance of an Event of Default, the Guarantied Parties are prevented by Applicable Law from exercising their respective rights to accelerate the maturity of the Guarantied Obligations, to collect interest on the Guarantied Obligations, or to enforce or exercise any other right or remedy with respect to the Guarantied Obligations, or the Administrative Agent is prevented from taking any action to realize on the Collateral, such Guarantor agrees to pay to the Administrative Agent for the account of the Guarantied Parties, upon demand therefor, for application to the Guarantied Obligations, the amount that would otherwise have been due and payable had such rights and remedies been permitted to be exercised by the Guarantied Parties. (e) Each Guarantor hereby assumes responsibility for keeping itself informed of the financial condition of the Borrower and of each other Loan Party, and of all other circumstances bearing upon the risk of nonpayment of the Guarantied Obligations or any part thereof, that diligent inquiry would reveal. Each Guarantor hereby agrees that the Guarantied Parties shall have no duty to advise any Guarantor of information known to any of the Guarantied Parties regarding such condition or any such circumstance. In the event that any of the Guarantied Parties in its sole discretion undertakes at any time or from time to time to provide any such 4 information to any Guarantor, such Guarantied Party shall be under no obligation (i) to undertake any investigation not a part of its regular business routine, (ii) to disclose any information which, pursuant to accepted or reasonable banking or commercial finance practices, such Guarantied Party wishes to maintain as confidential, or (iii) to make any other or future disclosures of such information or any other information to such Guarantor. (f) Each Guarantor consents and agrees that the Guarantied Parties shall be under no obligation to marshal any assets in favor of any Guarantor or otherwise in connection with obtaining payment of any or all of the Guarantied Obligations from any Person or source. SECTION 4. Representations and Warranties. Each Guarantor hereby represents and warrants to the Guarantied Parties that the representations and warranties set forth in Article 5 of the Credit Agreement as they relate to such Guarantor or to the Loan Documents to which such Guarantor is a party are true and correct in all material respects in the manner specified in the Credit Agreement and the Guarantied Parties shall be entitled to rely on each of them as if they were fully set forth herein. SECTION 5. Amendments, Etc. No amendment or waiver of any provision of this Guaranty nor consent to any departure by any Guarantor herefrom shall in any event be effective unless the same shall be in writing, approved by the Required Lenders (or by all the Lenders where the approval of each Lender is required under the Credit Agreement) and signed by the Administrative Agent, and then such waiver or consent shall be effective only in the specific instance and for the specific purpose for which given. SECTION 6. Addresses for Notices. All notices and other communications provided for hereunder shall be effectuated in the manner provided for in Section 10.02 of the Credit Agreement, provided that if a notice or communication hereunder is sent to a Guarantor, said notice shall be addressed to such Guarantor, in care of the Borrower at the Borrower's then current address (or facsimile number) for notice under the Credit Agreement. SECTION 7. No Waiver; Remedies. (a) No failure on the part of any Guarantied Party to exercise, and no delay in exercising, any right hereunder shall operate as a waiver thereof; nor shall any single or partial exercise of any right hereunder preclude any other or further exercise thereof or the exercise of any other right. The remedies herein provided are cumulative and not exclusive of any remedies provided by Applicable Law or any of the other Loan Documents. (b) No waiver by the Guarantied Parties of any default shall operate as a waiver of any other default or the same default on a future occasion, and no action by any of the Guarantied Parties permitted hereunder shall in way affect or impair any of the rights of the Guarantied Parties or the obligations of any Guarantor under this Guaranty or under any of the other Loan Documents, except as specifically set forth in any such waiver. Any determination by a court of competent jurisdiction of the amount of any principal and/or interest or other amount constituting any of the Guarantied Obligations shall be conclusive and binding on each 5 Guarantor irrespective of whether such Guarantor was a party to the suit or action in which such determination was made provided that the Borrower was so a party. SECTION 8. Right of Set-off. Upon the occurrence and during the continuance of any Event of Default under the Credit Agreement, each of the Guarantied Parties is hereby authorized at any time and from time to time, to the fullest extent permitted by Applicable Law, to set-off and apply any and all deposits (general or special (except trust and escrow accounts), time or demand, provisional or final) at any time held and other Indebtedness at any time owing by such Guarantied Party to or for the credit or the account of each Guarantor against any and all of the obligations of such Guarantor now or hereafter existing under this Guaranty, irrespective of whether or not such Guarantied Party shall have made any demand under this Guaranty and although such obligations may be contingent and unmatured; provided, however, such Guarantied Party shall promptly notify such Guarantor and the Borrower after such set-off and the application made by such Guarantied Party. The rights of each Guarantied Party under this Section 8 are in addition to other rights and remedies (including, without limitation, other rights of set-off) which such Guarantied Party may have. SECTION 9. Continuing Guaranty; Transfer of Notes. This Guaranty is a continuing guaranty and shall remain in full force and effect until the Release Date, (ii) be binding upon each Guarantor, its permitted successors and assigns, and (iii) inure to the benefit of and be enforceable by the Guarantied Parties and their respective successors, permitted transferees, and permitted assigns. Without limiting the generality of the foregoing clause (iii), each of the Guarantied Parties may assign or otherwise transfer any Note held by it or the Guarantied Obligations owed to it to any other Person, and such other Person shall thereupon become vested with all the rights in respect thereof granted to such Guarantied Party herein or otherwise with respect to such of the Notes and the Guarantied Obligations so transferred or assigned, subject, however, to compliance with the provisions of Section 10.07 of the Credit Agreement in respect of assignments. Except as the result of the consummation of a transaction permitted under Section 7.04(a) of the Credit Agreement, no Guarantor may assign any of its obligations under this Guaranty without first obtaining the written consent of the Lenders as set forth in the Credit Agreement. SECTION 10. Reimbursement. To the extent that any Guarantor shall be required hereunder to pay a portion of the Guarantied Obligations exceeding the greater of (a) the amount of the economic benefit actually received by such Guarantor from the Loans and the Letters of Credit and (b) the amount such Guarantor would otherwise have paid if such Guarantor had paid the aggregate amount of the Guarantied Obligations (excluding the amount thereof repaid by the Borrower) in the same proportion as such Guarantor's net worth at the date enforcement is sought hereunder bears to the aggregate net worth of all the Guarantors at the date enforcement is sought hereunder, then such Guarantor shall be reimbursed by such other Guarantors for the amount of such excess, pro rata, based on the respective net worths of such other Guarantors at the date enforcement hereunder is sought. Notwithstanding anything to the contrary, each Guarantor agrees that the Guarantied Obligations may at any time and from time to time exceed the amount of the liability of such Guarantor hereunder without impairing its guaranty herein or effecting the rights and remedies of the Guarantied Parties hereunder. This Section 10 is intended only to define the relative rights of the Guarantors, and nothing set forth in this Section 10 is intended to 6 or shall impair the obligations of the Guarantors, jointly and severally, to pay to the Guarantied Parties the Guarantied Obligations as and when the same shall become due and payable in accordance with the terms hereof. SECTION 11. Reinstatement. This Guaranty shall remain in full force and effect and continue to be effective should any petition be filed by or against any Loan Party for liquidation or reorganization, should any Loan Party become insolvent or make an assignment for the benefit of creditors or should a receiver or trustee be appointed for all or any significant part of any Loan Party's assets, and shall, to the fullest extent permitted by Applicable Law, continue to be effective or be reinstated, as the case may be, if at any time payment and performance of the Obligations, or any part thereof, is, pursuant to Applicable Law, rescinded or reduced in amount, or must otherwise be restored or returned by any obligees of the Obligations or such part thereof, whether as a "voidable preference," "fraudulent transfer," or otherwise, all as though such payment or performance had not been made. In the event that any payment, or any part thereof, is rescinded, reduced, restored or returned, the Guarantied Obligations shall, to the fullest extent permitted by law, be reinstated and deemed reduced only by such amount paid and not so rescinded, reduced, restored or returned. SECTION 12. GOVERNING LAW. (a) THIS GUARANTY SHALL BE GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH, THE LAW OF THE STATE OF TEXAS APPLICABLE TO AGREEMENTS MADE AND TO BE PERFORMED ENTIRELY WITHIN SUCH STATE; PROVIDED THAT EACH PARTY SHALL RETAIN ALL RIGHTS ARISING UNDER FEDERAL LAW. (b) The parties hereto agree that Chapter 346 (other than 346.004) of the Texas Finance Code (which regulates certain revolving credit accounts and revolving tri-party accounts) shall not apply to Loans under this Guaranty. (c) ANY LEGAL ACTION OR PROCEEDING WITH RESPECT TO THIS GUARANTY OR ANY OTHER LOAN DOCUMENT MAY BE BROUGHT IN THE COURTS OF THE STATE OF TEXAS SITTING IN DALLAS COUNTY, TEXAS OR IN THE UNITED STATES DISTRICT COURT FOR THE NORTHERN DISTRICT OF TEXAS (DALLAS DIVISION), AND BY EXECUTION AND DELIVERY OF THIS GUARANTY, THE GUARANTOR, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER CONSENTS, FOR ITSELF AND IN RESPECT OF ITS PROPERTY, TO THE NON-EXCLUSIVE JURISDICTION OF THOSE COURTS. THE GUARANTOR, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER IRREVOCABLY WAIVES ANY OBJECTION, INCLUDING ANY OBJECTION TO THE LAYING OF VENUE OR BASED ON THE GROUNDS OF FORUM NON CONVENIENS, WHICH IT MAY NOW OR HEREAFTER HAVE TO THE BRINGING OF ANY ACTION OR PROCEEDING IN SUCH JURISDICTION IN RESPECT OF ANY LOAN DOCUMENT OR OTHER DOCUMENT RELATED THERETO. THE GUARANTOR, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER WAIVES PERSONAL SERVICE OF 7 ANY SUMMONS, COMPLAINT OR OTHER PROCESS, WHICH MAY BE MADE BY ANY OTHER MEANS PERMITTED BY THE LAW OF SUCH STATE. SECTION 13. Waiver of Jury Trial. EACH GUARANTOR, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER HEREBY (OR BY ACCEPTANCE HEREOF) EXPRESSLY WAIVES ANY RIGHT TO TRIAL BY JURY OF ANY CLAIM, DEMAND, ACTION OR CAUSE OF ACTION ARISING UNDER ANY LOAN DOCUMENT OR IN ANY WAY CONNECTED WITH OR RELATED OR INCIDENTAL TO THE DEALINGS OF ANY ONE OR MORE OF EACH GUARANTOR, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER WITH RESPECT TO ANY LOAN DOCUMENT, OR THE TRANSACTIONS RELATED THERETO, IN EACH CASE WHETHER NOW EXISTING OR HEREAFTER ARISING, AND WHETHER FOUNDED IN CONTRACT OR TORT OR OTHERWISE; AND EACH OF THE GUARANTORS, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER HEREBY AGREES AND CONSENTS THAT ANY SUCH CLAIM, DEMAND, ACTION OR CAUSE OF ACTION SHALL BE DECIDED BY COURT TRIAL WITHOUT A JURY, AND THAT ANY OF THE GUARANTORS, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER MAY FILE AN ORIGINAL COUNTERPART OR A COPY OF THIS SECTION WITH ANY COURT AS WRITTEN EVIDENCE OF THE CONSENT OF EACH GUARANTOR, THE BORROWER, THE ADMINISTRATIVE AGENT AND EACH LENDER TO THE WAIVER OF THEIR RIGHT TO TRIAL BY JURY. SECTION 14. Section Titles. The Section titles contained in this Guaranty are and shall be without substantive meaning or content of any kind whatsoever and are not a part of this Guaranty. SECTION 15. Execution in Counterparts. This Guaranty may be executed in any number of counterparts and by different parties hereto in separate counterparts, each of which when so executed and delivered shall be deemed to be an original and all of which taken together shall constitute one and the same Guaranty. SECTION 16. Miscellaneous. All references herein to the Borrower or to any Guarantor shall include their respective successors and assigns, including, without limitation, a receiver, trustee or debtor-in-possession of or for the Borrower or such Guarantor. All references to the singular shall be deemed to include the plural where the context so requires. SECTION 17. Subrogation and Subordination. (a) Subrogation. Notwithstanding any reference to subrogation contained herein to the contrary, until the Release Date, each Guarantor hereby irrevocably waives any claim or other rights which it may have or hereafter acquire against the Borrower that arise from the existence, payment, performance or enforcement of such Guarantor's obligations under this Guaranty, including, without limitation, any right of subrogation, reimbursement, exoneration, contribution, indemnification, any right to participate in any claim or remedy of any Lender against the Borrower or any collateral which any Lender now has or hereafter acquires, whether or not such claim, remedy or right arises in equity, or under contract, statutes or common law, 8 including without limitation, the right to take or receive from the Borrower, directly or indirectly, in cash or other property or by set-off or in any other manner, payment or security on account of such claim or other rights. If any amount shall be paid to any Guarantor in violation of the preceding sentence and the Guarantied Obligations shall not have been paid in full, such amount shall be deemed to have been paid to such Guarantor for the benefit of, and held in trust for the benefit of, the Lenders, and shall forthwith be paid to the Administrative Agent to be credited and applied upon the Guarantied Obligations, whether matured or unmatured, in accordance with the terms of the Credit Agreement. Each Guarantor acknowledges that it will receive direct and indirect benefits from the financing arrangements contemplated by the Credit Agreement and that the waiver set forth in this Section 17 is knowingly made in contemplation of such benefits. (b) Subordination. All debt and other liabilities of the Borrower to any Guarantor ("Borrower Debt") are expressly subordinate and junior to the Guarantied Obligations and any instruments evidencing the Borrower Debt to the extent provided below. (i) Until the Release Date, each Guarantor agrees that it will not request, demand, accept, or receive (by set-off or other manner) any payment amount, credit or reduction of all or any part of the amounts owing under the Borrower Debt or any security therefor, except as specifically allowed pursuant to clause (ii) below; (ii) Notwithstanding the provisions of clause (i) above, the Borrower may pay to the Guarantors and the Guarantors may request, demand, accept and receive and retain from the Borrower payments, credits or reductions of all or any part of the amounts owing under the Borrower Debt or any security therefor on the Borrower Debt, provided that the Borrower's right to pay and the Guarantors' right to receive any such amount shall automatically and be immediately suspended and cease (A) upon the occurrence and during the continuance of an Event of Default or (B) if, after taking into account the effect of such payment, an Event of Default would occur and be continuing. The Guarantors' right to receive amounts under this clause (ii) (including any amounts which theretofore may have been suspended) shall automatically be reinstated at such time as the Event of Default which was the basis of such suspension has been cured or waived (provided that no subsequent Event of Default has occurred) or such earlier date, if any, as the Administrative Agent gives notice to the Guarantors of reinstatement by the Required Lenders, in the Required Lenders' sole discretion; (iii) If any Guarantor receives any payment on the Borrower Debt in violation of this Guaranty, such Guarantor will hold such payment in trust for the Lenders and will immediately deliver such payment to the Administrative Agent; and (iv) In the event of the commencement or joinder of any suit, action or proceeding of any type (judicial or otherwise) or proceeding under any Debtor Relief Law against the Borrower (an "Insolvency Proceeding") and subject to court orders issued pursuant to the Bankruptcy Code, the Guarantied Obligations shall first be paid, discharged and performed in full before any payment or performance is made upon the Borrower Debt notwithstanding any other provisions which may be made in such Insolvency Proceeding. In the event of any Insolvency Proceeding, each Guarantor will 9 at any time prior to the Release Date (A) file, at the request of any Guarantied Party, any claim, proof of claim or similar instrument necessary to enforce the Borrower's obligation to pay the Borrower Debt, and (B) hold in trust for and pay to the Guarantied Parties any and all monies, obligations, property, stock dividends or other assets received in any such proceeding on account of the Borrower Debt in order that the Guarantied Parties may apply such monies or the cash proceeds of such other assets to the Obligations. SECTION 18. Guarantor Insolvency. Should any Guarantor voluntarily seek, consent to, or acquiesce in the benefits of any Debtor Relief Law or become a party to or be made the subject of any proceeding provided for by any Debtor Relief Law (other than as a creditor or claimant) that could suspend or otherwise adversely affect the rights of any Guarantied Party granted hereunder, then, the obligations of such Guarantor under this Guaranty shall be, as between such Guarantor and such Guarantied Party, a fully-matured, due, and payable obligation of such Guarantor to such Guarantied Party (without regard to whether the Borrower is then in default under the Credit Agreement or whether any part of the Guarantied Obligations is then due and owing by the Borrower to such Guarantied Party), payable in full by such Guarantor to such Guarantied Party upon demand, which shall be the estimated amount owing in respect of the contingent claim created hereunder. SECTION 19. Rate Provision. It is not the intention of any Guarantied Party to make an agreement violative of the laws of any applicable jurisdiction relating to usury. Regardless of any provision in this Guaranty, no Guarantied Party shall ever be entitled to contract, charge, receive, collect or apply, as interest on the Guarantied Obligations, any amount in excess of the Highest Lawful Rate. In no event shall any Guarantor be obligated to pay any amount in excess of the Highest Lawful Rate. If from any circumstance the Administrative Agent or any Guarantied Party shall ever receive, collect or apply anything of value deemed excess interest under Applicable Law, an amount equal to such excess shall be applied to the reduction of the principal amount of outstanding Revolving Loans, Term Loans, Swing Line Loans, L/C Borrowings and any remainder shall be promptly refunded to the payor. In determining whether or not interest paid or payable with respect to the Guarantied Obligations, under any specified contingency, exceeds the Highest Lawful Rate, the Guarantors and the Guarantied Parties shall, to the maximum extent permitted by Applicable Law, (a) characterize any non-principal payment as an expense, fee or premium rather than as interest, (b) amortize, prorate, allocate and spread the total amount of interest throughout the full term of such Obligations so that the interest paid on account of such Guarantied Obligations does not exceed the Highest Lawful Rate and/or (c) allocate interest between portions of such Guarantied Obligations; provided that if the Guarantied Obligations are paid and performed in full prior to the end of the full contemplated term thereof, and if the interest received for the actual period of existence thereof exceeds the Highest Lawful Rate, the Guarantied Parties shall refund to the payor the amount of such excess or credit the amount of such excess against the total principal amount owing, and, in such event, no Guarantied Party shall be subject to any penalties provided by any laws for contracting for, charging or receiving interest in excess of the Highest Lawful Rate. SECTION 20. Severability. Any provision of this Guaranty which is for any reason prohibited or found or held invalid or unenforceable by any court or governmental agency shall be ineffective to the extent of such prohibition or invalidity or unenforceability, without 10 invalidating the remaining provisions hereof in such jurisdiction or affecting the validity or enforceability of such provision in any other jurisdiction. SECTION 21. ENTIRE AGREEMENT. THIS GUARANTY AND THE OTHER LOAN DOCUMENTS REPRESENT THE FINAL AGREEMENT BETWEEN THE PARTIES REGARDING THE SUBJECT MATTER HEREIN AND MAY NOT BE CONTRADICTED BY EVIDENCE OF PRIOR, CONTEMPORANEOUS. OR SUBSEQUENT ORAL AGREEMENTS BETWEEN THE PARTIES. THERE ARE NO UNWRITTEN ORAL AGREEMENTS BETWEEN THE PARTIES. SECTION 22. Conflicts. If in the event of a conflict between the terms and conditions of this Guaranty and the terms and conditions of the Credit Agreement, the terms and conditions of the Credit Agreement shall control. SECTION 23. Taxes. (a) Except as provided below in this Section 23, any and all payments by each Guarantor to or for the account of the Administrative Agent or any Lender under this Guaranty or any other Loan Document shall be made free and clear of and without deduction for any and all present or future stamp or other taxes, duties, levies, imposts, deductions, assessments, fees, withholdings or similar charges, now or hereafter imposed, and all liabilities with respect thereto, excluding, in the case of the Administrative Agent and any Lender, or its applicable lending office, or any branch or affiliate thereof, taxes imposed on or measured by its net income (including net income taxes imposed by means of a backup withholding tax) franchise taxes, branch taxes, taxes on doing business or taxes measured by or imposed upon the overall capital or net worth of any Lender or its applicable lending office, or any branch or affiliate thereof, in each case imposed: (i) by the jurisdiction (or political subdivision thereof) under the laws of which the Administrative Agent, or such Lender, applicable lending office, branch or affiliate is organized or is located, or in which the principal executive office of the Administrative Agent or any Lender is located, or any nation within which such jurisdiction is located or any political subdivision thereof; or (ii) by reason of any present or former connection between the jurisdiction imposing such tax and the Administrative Agent or such Lender, applicable lending office, branch or affiliate other than a connection arising solely from the Administrative Agent or such Lender having executed, delivered or performed its obligation under, or received payment under or enforced this Agreement (all such non-excluded taxes, duties, levies, imposts, deductions, assessments, fees, withholdings or similar charges, and liabilities being hereinafter referred to as "Taxes"). If any Guarantor shall be required by any Laws to deduct any Taxes from or in respect of any sum payable under this Guaranty or any other Loan Document to the Administrative Agent or any Lender, then, except as provided below in this Section 23, (i) the sum payable shall be increased as necessary to yield to the Administrative Agent and such Lender an amount equal to the sum it would have received had no such deductions been made, (ii) such Guarantor shall make such deductions, (iii) such Guarantor shall pay the full amount deducted to the relevant taxation authority or other authority in accordance with applicable Laws, and (iv) promptly (but in no event later than 30 days) after the date of 11 such payment, such Guarantor shall furnish to the Administrative Agent (which shall forward the same to such Lender) the original or a certified copy of a receipt evidencing payment thereof; provided, however, that such Guarantor shall be entitled to deduct and withhold any Taxes and shall not be required to increase any such amounts payable to any Lender with respect to Taxes (i) that are directly attributable to such Lender's failure to comply with the requirements of Section 10.15 of the Credit Agreement or (ii) that are U.S. withholding taxes imposed on amounts payable to such Lender at the time such Lender becomes a party to the Credit Agreement. (b) In addition, each Guarantor agrees to pay any and all present or future stamp, court or documentary taxes and any other excise or property taxes or charges or similar levies which arise from any payment made under this Guaranty or any other Loan Document or from the execution, delivery, performance, enforcement or registration of, or otherwise with respect to, this Guaranty or any other Loan Document (hereinafter referred to as "Other Taxes") provided, that the term "Other Taxes," as used in this Guaranty, shall not include or be deemed to mean, and the Guarantors shall not be obligated to pay any such taxes, charges or similar levies that are incurred or payable by any Person in connection with any assignment referred to in Section 10.07(b) of the Credit Agreement, any participation referred to in Section 10.07(d) of the Credit Agreement or any pledge or security interest referred to in Section 10.07(f) of the Credit Agreement. (c) If any Guarantor shall be required to deduct or pay any Taxes or Other Taxes from or in respect of any sum payable under this Guaranty or any other Loan Document to the Administrative Agent or any Lender, such Guarantor shall also pay to the Administrative Agent (for the account of such Lender) or to such Lender, at the time interest on the Guarantied Obligations is paid, such additional amount that such Lender specifies as necessary to preserve the after-tax yield (after factoring in all taxes, including taxes imposed on or measured by net income) such Lender would have received if such Taxes or Other Taxes had not been imposed. (d) Each Guarantor agrees to indemnify the Administrative Agent and each Lender for (i) the full amount of Taxes and Other Taxes (including any Taxes or Other Taxes imposed or asserted by any jurisdiction on amounts payable under this Section) paid by the Administrative Agent and such Lender, (ii) amounts payable under Section 23(c) and (iii) any liability (including penalties, interest and expenses) arising therefrom or with respect thereto, in each case whether or not such Taxes or Other Taxes were correctly or legally imposed or asserted by the relevant Governmental Authority. Payment under this subsection (d) shall be made within 30 days after the date the Lender or the Administrative Agent makes a demand therefor. (e) Any Lender claiming any additional amounts payable pursuant to this Section 23 shall use its reasonable best efforts (consistent with its internal policy and legal and regulatory restrictions) to change the jurisdiction of its lending office, if the making of such a change would avoid the need for, or reduce the amount of, any such 12 additional amounts which may thereafter accrue and would not, in the reasonable judgment of such Lender, be disadvantageous to such Lender. (f) Each Lender (and the Administrative Agent with respect to payments to the Administrative Agent for its own account) agrees that (i) it will take all reasonable actions by all usual means to maintain all exemptions, if any, available to it from United States withholding taxes (whether available by treaty, existing administrative waiver, by virtue of the location of any Lender's lending office) and (ii) otherwise cooperate with the Borrower to minimize amounts payable by each Guarantor under this Section 23; provided, however, the Lenders and the Administrative Agent shall not be obligated by reason of this Section 23(f) to contest the payment of any Taxes or Other Taxes or to disclose any information regarding its tax affairs or tax computations or reorder its tax or other affairs or tax or other planning. Subject to the foregoing, to the extent any Guarantor pays sums pursuant to this Section 23 and any Lender or the Administrative Agent receives a refund of any or all of such sums, such refund shall be applied to reduce any amounts then due and owing under this Guaranty or, to the extent that no amounts are due and owing under this Guaranty at the time such refunds are received, the party receiving such refund shall promptly pay over all such refunded sums to such Guarantor, provided that no Default is in existence at such time. (g) The obligations of each Guarantor and each Lender or Participant under this Section 23 shall survive the termination of this Agreement and the payment of the Loans and all other amounts payable hereunder and under the other Loan Documents. (h) Notwithstanding anything in this Section 23 to the contrary, the demand by the Administrative Agent or any Lender for the payment of Taxes or Other Taxes under this Section 23 shall not include any Taxes or Other Taxes that occurred 180 days prior to the date that the Administrative Agent or such Lender had knowledge or should have had knowledge of such Taxes or Other Taxes unless the Administrative Agent or such Lender notifies the Borrower of such Taxes or Other Taxes no later than 180 days after the date that the Administrative Agent or such Lender had knowledge or should have had knowledge of such Taxes or Other Taxes. ================================================================================ REMAINDER OF PAGE LEFT INTENTIONALLY BLANK ================================================================================ 13 IN WITNESS WHEREOF, each Guarantor has caused this Guaranty to be duly executed and delivered by its duly authorized officer on the date first above written. NCI HOLDING CORP. NCI OPERATING CORP. METAL COATERS OF CALIFORNIA, INC. By: /s/ ROBERT J. MEDLOCK -------------------------------- Robert J. Medlock Executive Vice President and Chief Financial Officer A & S BUILDING SYSTEMS, L.P. NCI BUILDING SYSTEMS, L.P. METAL BUILDING COMPONENTS, L.P. METAL COATERS OPERATING, L.P. By: NCI OPERATING CORP., as General Partner By: /s/ ROBERT J. MEDLOCK -------------------------------- Robert J. Medlock Executive Vice President and Chief Financial Officer