<PAGE>
 
                         REGISTRATION RIGHTS AGREEMENT
                         -----------------------------

     THIS REGISTRATION RIGHTS AGREEMENT (this "Agreement") is made as of June
                                               ---------                     
26, 1997, by and between TEMPLATE SOFTWARE, INC., a Virginia corporation (the
"Company"), HEINZ-DIETER DIETRICH and KLAUS-DIETER JANSEN (individually, the
--------                                                                    
"Investor" and collectively, the "Investors").
---------                         ---------   

                                   RECITALS
                                   --------

  A.  Concurrently with the execution of this Agreement, the Investors are
acquiring from the Company shares of the Company's Common Stock, par value $0.01
per share, pursuant to certain stock purchase agreements of even date herewith
between the Company and each of the Investors (collectively, the "Purchase
                                                                  --------
Agreements").  Capitalized terms used herein, but not otherwise defined, shall
----------                                                                    
have the meaning ascribed to them in the Purchase Agreements.

  B.  By entering into this Agreement, the Company wishes to provide a further
inducement to the Investors to acquire the Company's Common Stock pursuant to
the Purchase Agreements.

                                   AGREEMENT
                                   ---------

     NOW, THEREFORE, in consideration of the mutual covenants and agreements
contained herein, and for other good and valuable consideration, the receipt and
sufficiency of which is hereby acknowledged, the parties agree as follows:

     1.  DEFINITIONS.  For purposes of this Agreement:
         -----------                                  

         (a)  "Common Shares" means shares of Common Stock, par value $0.01 
               -------------                     
per share of the Company.

         (b)  "Exchange Act" means the Securities Exchange Act of 1934, as 
               ------------    
amended.

         (c)  "Form S-3" means such form under the Securities Act as in effect 
               --------    
on the date hereof or any registration form under the Securities Act 
subsequently adopted by the SEC which permits inclusion or incorporation of 
substantial information by reference to other documents filed by the Company
with the SEC.

         (d)  "Person" means any individual, partnership, limited liability 
               ------     
company, joint venture, corporation, association, trust or any other entity or
organization.

         (e)  "Register," "registered," and "registration" refer to a 
               --------    ----------        ------------
registration effected by preparing and filing a registration statement or
similar document in compliance with the 
<PAGE>
 
Securities Act, and the declaration or ordering of effectiveness of such
registration statement or document.

         (f)  "Registrable Securities" means the 90,000 Common Shares issued to 
               ---------------------- 
the Investors pursuant to the Purchase Agreements.

         (g)  "SEC" means the Securities and Exchange Commission.
               ---                                               

         (h)  "Securities Act" means the Securities Act of 1933, as amended.
               --------------                                               

         (i)  "Violation" means any of the following statements, omissions or 
               ---------   
violations: (i) any untrue statement or alleged untrue statement of a material
fact contained in a registration statement under this Agreement, including any
preliminary prospectus or final prospectus contained therein or any amendments
or supplements thereto or any documents filed under state securities or "blue
sky" laws in connection therewith, (ii) the omission or alleged omission to
state therein a material fact required to be stated therein, or necessary to
make the statements therein not misleading, or (iii) any violation or alleged
violation by the Company of the Securities Act, the Exchange Act, any state
securities law or any rule or regulation promulgated under the Securities Act,
the Exchange Act or any state securities law.

     2.  DEMAND REGISTRATION.
         ------------------- 

         (a) If, at any time following the one (1) year anniversary of the
Closing, the Company receives from the Investors a written request (the date of
such request being referred to herein as the "Notice Date") that the Company
                                              -----------
file a registration statement under the Securities Act, then the Company shall,
subject to the limitations of Section 2(b) below, use its best efforts to
                              ------------
effect as soon as practicable, and in any event within one hundred twenty (120)
days of the receipt of such request, the registration of all Registrable
Securities which the Investors request to be registered; provided, however, that
                                                         --------- -------
the Company shall not have any obligation to effect a registration statement
pursuant hereto unless the Investors seek registration of shares with an
aggregate public offering of at least $10,000,000.

         (b) If the Investors intend to distribute the Registrable Securities
covered by their request by means of an underwriting, they shall so advise the
Company as a part of their request made pursuant to this Section 2 and such
                                                         ---------
underwriter(s) shall be reasonably satisfactory to the Company. The Investors
shall (together with the Company as provided in Section 4(f)) enter
                                                ------------
into an underwriting agreement in customary form with the underwriter or
underwriters so selected for such underwriting. Notwithstanding any other
provision of this Section 2, if the underwriter advises the Investors
                  ---------
that marketing factors require a limitation of the number of shares to be
underwritten, then the Investors shall so advise the Company, and the number of
shares of Registrable Securities that may be included in the underwriting shall
be allocated (i) first to the Investors; and (ii) thereafter, to the extent
additional securities may be included in the offering, to the Company.

                                        2

<PAGE>
 
         (c)  The Company shall be obligated to effect only one (1) 
registration pursuant to this Section 2, but an offering which is not
                              ---------
consummated shall not be counted for this purpose. The Company's obligation to
register Common Shares under this Section 2 shall terminate on the second
                                  ---------
anniversary of the Closing Date.

         (d) In the event of a registration of Registrable Securities pursuant
to this Section 2, the Company shall make available such officers and employees
        ---------
of the Company as the underwriters designated by the Investors in
accordance with this Agreement may reasonably request for purposes of
cooperating with such underwriter's marketing efforts.

         (e) Notwithstanding the foregoing, if the Company shall furnish to the
Investors a certificate signed by the President of the Company stating that in
the good faith judgment of the Board of Directors of the Company, it would be
seriously detrimental to the Company and its shareholders for such registration
statement to be filed by reason of a material pending transaction and it is
therefore essential to defer the filing of such registration statement, the
Company shall have the right to defer such filing for a period of not more than
one hundred twenty (120) days after receipt of the request of the Investors;
provided, however, that the Company may not utilize this right more than
--------  -------
once in any twelve (12) month period.

     3.  PIGGY-BACK REGISTRATION.
         ----------------------- 

         (a) If (but without any obligation to do so) the Company proposes to
register (including for this purpose a registration effected by the Company for
shareholders other than the Investors) any of its securities under the
Securities Act in connection with the public offering of such securities solely
for cash, the Company shall, at such time, promptly give the Investors written
notice of such registration. Upon the written request of the Investors given
within twenty (20) days after mailing of such notice by the Company in
accordance with Section 17, the Company shall, subject to the provisions of 
                ----------
Section 8, use its best efforts to cause to be registered under the Securities 
---------
Act all of the Registrable Securities that the Investors have requested to be
registered. The Company shall have no obligation under this Section 3 to make
                                                            ---------
any offering of its securities, or to complete an offering of its securities 
that it proposes to make, and shall incur no liability to the Investors for its
failure to do so.

         (b) The Company shall not have any obligations under Section 3(a) with
                                                              -----------
respect to any proposed registration of securities under a registration on Form
S-8 relating solely to the sale of securities to participants in a Company stock
plan or to other compensatory arrangements to the extent includable on Form S-8,
or a registration on Form S-4;

         (c)  The Company's obligation to register Common Shares under 
Section 3(a) shall terminate on the earlier of the following:  (i) the second 
------------
anniversary of the Closing Date; or (ii) upon exercise of a demand registration 
pursuant to Section 2 above.
            ---------

                                        3

<PAGE>
 
     4.  OBLIGATIONS OF THE COMPANY.  Whenever required under this Agreement to
         --------------------------                                            
effect the registration of any Registrable Securities, the Company shall, as
expeditiously as reasonably possible:

         (a) Prepare and file with the SEC a registration statement with respect
to such Registrable Securities and use its best efforts to cause such
registration statement to become effective, and, upon the request of the
Investors, keep such registration statement effective for up to ninety (90) days
or until the Investors have completed the distribution referred to in such
registration statement, whichever occurs first (but in any event for at least
any period required under the Securities Act); provided, however,
                                               --------  ------- 
that before filing such registration statement or any amendments thereto, the
Company will furnish to the Investors copies of all such documents proposed to
be filed. The running of the ninety (90) day period provided for in the
preceding sentence shall be tolled during any period of time in which any stop
order relating to such registration statement is in effect and during any period
from the date that the Company gives any notice provided for in Section 4(g)
                                                                ------------
until such time as any amendment or supplement required in connection therewith
has been filed and is effective and adequate copies thereof have been
provided to the Investors for delivery under the Securities Act.

         (b) Prepare and file with the SEC such amendments and supplements to
such registration statement and the prospectus used in connection with such
registration statement as may be necessary to comply with the provisions of the
Securities Act with respect to the disposition of all securities covered by such
registration statement.

         (c) Furnish to the Investors such number of copies of such registration
statement and of each amendment and supplement thereto (in each case including
all exhibits), such number of copies of the prospectus contained in such
registration statement (including each preliminary prospectus and any summary
prospectus) and any other prospectus filed under Rule 424 under the Securities
Act, in conformity with the requirements of the Securities Act, and such other
documents as the Investors may reasonably request in order to facilitate the
disposition of Registrable Securities which he owns.

         (d) Use its best efforts to register and qualify the securities covered
by such registration statement under such other securities or "blue sky" laws of
such states or jurisdictions as shall be reasonably requested by the Investors,
provided that the Company shall not be required in connection therewith or as a
condition thereto (i) to qualify to do business in any state or jurisdiction
where it would not otherwise be required to qualify but for the requirements of
this clause (d), or (ii) to file a general consent to service of process in any
such state or jurisdiction.

         (e) Use its best efforts to cause all Registrable Securities covered by
such registration statement to be registered with or approved by such other
governmental agencies or authorities as may be necessary by virtue of the
Company's business or operations to enable the seller or sellers thereof to
consummate the disposition of such Registrable Securities.

                                        4
<PAGE>
 
         (f) In the event of any underwritten public offering, enter into and
perform its obligations under an underwriting agreement, in usual and customary
form, with the managing underwriter of such offering.

         (g) Notify the Investors at any time when a prospectus is required to
be delivered under the Securities Act of the happening of any event as a result
of which the prospectus included in such registration statement, as then in
effect, includes an untrue statement of a material fact or omits to state a
material fact required to be stated therein or necessary to make the statements
therein not misleading in the light of the circumstances then existing.

         (h) Notify the Investors and the Investors' underwriters, if any, and
confirm such advice in writing: (i) when the registration statement has become
effective, (ii) when any post-effective amendment to the registration statement
becomes effective, and (iii) of any request by the SEC for any amendment or
supplement to the registration statement or prospectus or for additional
information.

         (i) Notify the Investors if at any time the SEC should institute or
threaten to institute any proceedings for the purpose of issuing, or should
issue, a stop order suspending the effectiveness of the Registration Statement.
Upon the occurrence of any of the events mentioned in the preceding sentence,
the Company will use its best efforts to prevent the issuance of any such stop
order or to obtain the withdrawal thereof as soon as possible. The Company will
advise the Investors promptly of any order or communication of any public board
or body addressed to the Company suspending or threatening to suspend the
qualification of any Registrable Securities for sale in any jurisdiction.

         (j) Furnish, at the request of the Investors, (i) on the date that such
Registrable Securities are delivered to the underwriters for sale in connection
with a registration pursuant to this Agreement, if such securities are being
sold through underwriters, or, if such securities are not being sold through
underwriters, on the date that the registration statement with respect to such
securities becomes effective, an opinion, dated such date, of the counsel
representing the Company for the purposes of such registration, in such form and
substance as is customarily given to underwriters in an underwritten public
offering, addressed to the underwriters, if any, and to the Investors, and (ii)
on the date that the registration statement with respect to such securities
becomes effective, a "comfort" letter dated such date, from the independent
certified public accountants of the Company, in form and substance as is
customarily given by independent certified public accountants to underwriters in
an underwritten public offering, addressed to the underwriters, if any, and to
the Investors, and, if such securities are being sold through underwriters, a
reaffirmation of such letter on the date that such Registrable Securities are
delivered to the underwriters for sale.

         (k) As soon as practicable after the effective date of the registration
statement, and in any event within sixteen (16) months thereafter, have "made
generally available to its security holders" (within the meaning of Rule 158
under the Securities Act) an earnings statement (which need not be audited)
covering a period of at least twelve (12) months beginning 

                                        5
<PAGE>
 
after the effective date of the registration statement and otherwise complying
with Section 11(a) of the Securities Act.

     5.  FURNISH INFORMATION.  It shall be a condition precedent to the 
         -------------------
obligations of the Company to take any action pursuant to this Agreement with 
respect to the Registrable Securities that the Investors shall furnish to the
Company such information regarding themselves, the Registrable Securities held
by them, and the intended method of disposition of such securities as shall be
required to effect the registration of the Registrable Securities.

     6.  EXPENSES OF DEMAND REGISTRATION.  All expenses, other than underwriting
         -------------------------------                                        
discounts and commissions relating to the Registrable Securities, incurred in
connection with registrations, filings or qualifications pursuant to Section 2,
                                                                     --------- 
including without limitation all registration, filing and qualification fees,
printers' and accounting fees, fees and disbursements of counsel for the
Company, shall be borne by the Company.

     7.  EXPENSES OF PIGGY-BACK REGISTRATION.  The Company shall bear and pay 
         -----------------------------------  
all expenses incurred in connection with any registration, filing or 
qualification of Registrable Securities with respect to the registrations
pursuant to Section 3 for the Investors, including without limitation all
            ---------
registration, filing and qualification fees, printers' and accounting fees
relating or apportionable thereto and the fees and disbursements of one counsel
for the selling holders (selected by the holders of a majority of the
Registrable Securities being registered), but excluding underwriting discounts
and commissions relating to Registrable Securities.

     8.  UNDERWRITING REQUIREMENTS.  In connection with any offering involving 
         -------------------------    
an underwriting of shares being issued by the Company, the Company shall not be
required under Section 3 to include any Registrable Securities in such
               ---------                                              
underwriting unless the Investors accept the terms of the underwriting as agreed
upon between the Company and the underwriters selected by the Company, and then
only in such quantity as will not, in the opinion of the underwriters,
jeopardize the success of the offering by the Company; provided, however, that
                                                       --------  -------      
the Investors shall not be required to make any representations or warranties
except as they relate to the Investors' ownership of shares and authority to
enter into the underwriting agreement and to the Investors' intended method of
distribution, and the liability of the Investors shall be limited to an amount
equal to the net proceeds from the offering received by the Investors.  If the
total amount of securities, including Registrable Securities, requested by
holders to be included in such offering (the "Secondary Securities") exceeds the
                                              --------------------              
amount of Secondary Securities that the underwriters reasonably believe
compatible with the success of the offering, then the Company shall be required
to include in the offering only that number of Secondary Securities, including
Registrable Securities, which the underwriters believe will not jeopardize the
success of the offering.  The amount of Secondary Securities to be so included
in the offering shall be allocated among the holders of such securities pro rata
                                                                        --- ----
according to the number of such securities held by each such holder or as may be
otherwise agreed upon among such holders.

     9.  INDEMNIFICATION.  In the event any Registrable Securities are included 
         ---------------  
in a registration statement under this Agreement:

                                        6
<PAGE>
 
     (a)  The Company will indemnify and hold harmless the Investors, their 
heirs, personal representatives and assigns and any underwriter (as defined in 
the Securities Act) for the Investors and each Person, if any, who controls the
Investors or underwriter within the meaning of the Securities Act or the
Exchange Act against any losses, claims, damages or liabilities (joint or
several) to which they may become subject under the Securities Act, the Exchange
Act or other federal or state law, insofar as such losses, claims, damages or
liabilities (or actions in respect thereof) arise out of or are based upon a
Violation; provided, however, that the Company will not be required to 
           --------- -------
indemnify any of the foregoing Persons on account of any losses, claims, damages
or liabilities arising from a Violation if and to the extent that such Violation
was made in a preliminary prospectus and was corrected in a subsequent
prospectus that was required by law to be delivered to the Person making the
claim with respect to which indemnification is sought hereunder (and such
subsequent prospectus was made available by the Company to permit delivery of
such prospectus in a timely manner), and such subsequent prospectus was not so
delivered to such Person); and the Company will pay to each such indemnified
party, as incurred, any legal or other expenses reasonably incurred by them in
connection with investigating or defending any such loss, claim, damage,
liability, or action; provided, however, that the indemnity agreement
                      --------  -------                              
contained in this Section 9(a) shall not apply to amounts paid in
                  ------------                                   
settlement of any such loss, claim, damage, liability or action if such
settlement is effected without the consent of the Company (which consent shall
not be unreasonably withheld), nor shall the Company be liable in any such case
to a particular indemnified party for any such loss, claim, damage, liability or
action to the extent that it arises out of or is based upon a Violation which
occurs in reliance upon and in conformity with written information furnished
expressly for use in connection with such registration by or on behalf of such
indemnified party.

     (b)  The Investors will indemnify and hold harmless the Company, each of 
its directors, each of its officers who has signed the registration statement,
each Person, if any, who controls the Company within the meaning of the
Securities Act, any underwriter, any other holder selling securities in such
registration statement and any controlling Person of any such underwriter or
other holder, against any losses, claims, damages or liabilities (joint or
several) to which any of the foregoing Persons may become subject, under the
Securities Act, the Exchange Act or other federal or state law, insofar as such
losses, claims, damages or liabilities (or actions in respect thereto) arise out
of or are based upon any Violation, in each case to the extent (and only to the
extent) that such Violation occurs in reliance upon and in conformity with
written information furnished by or on behalf of the Investors expressly for use
in connection with such registration; and the Investors will pay, as incurred,
any legal or other expenses reasonably incurred by any Person intended to be
indemnified pursuant to this Section 9(b), in connection with investigating
                             ------------                                  
or defending any such loss, claim, damage, liability, or action; provided,
                                                                 -------- 
however, that the indemnity agreement contained in this Section 9(b) shall
-------                                                 ------------      
not apply to amounts paid in settlement of any such loss, claim, damage,
liability or action if such settlement is effected without the consent of the
Investors, which consent shall not be unreasonably withheld; and provided
                                                                 --------
further, however, that, in no event shall the liability of the
-------  -------  
Investors under this Section 9(b) exceed the net proceeds from the offering
                     ------------                                          
received by the Investors.
        
                                        7

<PAGE>
 
     (c)  Promptly after receipt by an indemnified party under this Section 9 of
                                                                    ---------   
notice of the commencement of any action (including any governmental action), 
such indemnified party will, if a claim in respect thereof is to be made 
against any indemnifying party under this Section 9, deliver to the
                                          ---------                
indemnifying party a written notice of the commencement thereof and the
indemnifying party shall have the right to participate in, and, to the extent
the indemnifying party so desires, jointly with any other indemnifying party
similarly noticed, to assume the defense thereof with counsel mutually
satisfactory to the parties; provided, however, that an indemnified party 
                             --------  -------         
shall have the right to retain its own counsel, with the fees and expenses to be
paid by the indemnifying party, if representation of such indemnified party by
the counsel retained by the indemnifying party would be inappropriate due to
actual or potential differing interests between such indemnified party and any
other party represented by such counsel in such proceeding. The failure to
deliver written notice to the indemnifying party within a reasonable time of the
commencement of any such action shall not relieve such indemnifying party of any
liability to the indemnified party under this Section 9 except if, and only to
                                              ---------
the extent that, the indemnifying party is actually prejudiced thereby; and such
failure to deliver written notice to the indemnifying party will not relieve it
of any liability that it may have to any indemnified party otherwise than under
this Section 9.
     --------- 

         (d)  The obligations of the Company and the Investors under this 
Section 9 shall survive the completion of any offering of Registrable 
---------
Securities in a registration statement under this Agreement, and otherwise.

         (e) Any indemnity agreements contained herein shall be in addition to
any other rights to indemnification or contribution which any indemnified party
may have pursuant to law or contract and shall remain operative and in full
force and effect regardless of any investigation made or omitted by or on behalf
of any indemnified party.

         (f)  If for any reason the foregoing indemnity is unavailable, then the
indemnifying party shall contribute to the amount paid or payable by the
indemnified party as a result of such losses, claims, damages, liabilities or
expenses (i) in such proportion as is appropriate to reflect the relative
benefits received by the indemnifying party on the one hand and the indemnified
party on the other (taking into consideration, among other things, the fact that
the provision of the registration rights and indemnification hereunder is a
material inducement to the Investors to acquire Common Shares pursuant to the
Purchase Agreements); or (ii) if the allocation provided by clause (i) above is
not permitted by applicable law or provides a lesser sum to the indemnified
party than the amount hereinafter calculated, in such proportion as is
appropriate to reflect not only the relative benefits received by the
indemnifying party on the one hand and the indemnified party on the other
(taking into consideration, among other things, the fact that the provision of
the registration rights and indemnification hereunder is a material inducement
to the Investors to purchase Common Shares pursuant to the Purchase Agreements)
but also the relative fault of the indemnifying party and the indemnified party
as well as any other relevant equitable considerations. The relative fault shall
be determined by reference to, among other things, whether the untrue or alleged
untrue statement of a material fact or the omission or alleged omission to state
a material fact relates to information supplied by or on 

                                        8

<PAGE>
 
behalf of the indemnifying party or the indemnified party and the parties'
relative intent, knowledge, access to information and opportunity to correct or
prevent such untrue statement or omission. No Person guilty of fraudulent
misrepresentation (within the meaning of Section 11(f) of the Securities Act)
shall be entitled to contribution from any Person who was not guilty of such
fraudulent misrepresentation.

     10.  REPORTS UNDER THE EXCHANGE ACT.  With a view to making available to 
           ------------------------------                    
the Investors the benefits of Rule 144 under the Securities Act and any other 
rule or regulation of the SEC that may at any time permit the Investors to sell
securities of the Company to the public without registration, the Company agrees
to:

         (a) make and keep public information available, as those terms are
understood and defined in Rule 144 under the Securities Act, at all times after
the effective date of the first registration statement filed by the Company for
the offering of its securities to the general public;

         (b)  file with the SEC in a timely manner all reports and other 
documents required of the Company under the Securities Act and the Exchange Act;
and

         (c) furnish to the Investors, so long as the Investors own any
Registrable Securities, forthwith upon request (i) a written statement by the
Company that it has complied with the reporting requirements of Rule 144 under
the Securities Act (at any time after the effective date of the first
registration statement filed by the Company) and the Securities Act and Exchange
Act (at any time after it has become subject to such reporting requirements);
(ii) a copy of the most recent annual or quarterly report of the Company and
such other reports and documents so filed by the Company; and (iii) such other
information as may be reasonably requested in availing the Investors of any rule
or regulation of the SEC which permits the selling of any such securities
without registration.

     11.  ASSIGNMENT OF REGISTRATION RIGHTS.  The rights to cause the Company to
          ---------------------------------                                     
register Registrable Securities pursuant to this Agreement may not be
transferred in whole or in part by the Investors.

     12.  MARKET STAND-OFF" AGREEMENT.  The Investors hereby agree that, during 
          ---------------------------
the period requested by the underwriters in the Company's initial public
offering (not to exceed 180 days following the effective date of the
registration statement of the Company filed under the Securities Act in
connection with such offering), he shall not sell or otherwise transfer or
dispose of any Common Shares or any securities of the Company convertible into
Common Shares held him.

     13.  AMENDMENT; WAIVER.  Any provision of this Agreement may be amended 
          ------------------
only with the written consent of the Company and the Investors.  The observance 
of any provision of this Agreement may be waived (either generally or in a
particular instance and either retroactively or prospectively) only with the
written consent of the party to be charged.

                                        9

<PAGE>
 
     14.  CHANGES IN REGISTRABLE SECURITIES.  If, and as often as, there are any
          ---------------------------------                                     
changes in the Registrable Securities by way of stock split, stock dividend,
combination or reclassification, or through merger, consolidation,
reorganization or recapitalization, or by any other means, appropriate
adjustment shall be made in the provisions of this Agreement, as may be
required, so that the rights and privileges granted hereby shall continue with
respect to the Registrable Securities as so changed.  Without limiting the
generality of the foregoing, the Company will require any successor by merger or
consolidation to assume and agree to be bound by the terms of this Agreement, as
a condition to any such merger or consolidation.

     15.  ENTIRE AGREEMENT.  This Agreement constitutes the full and entire
          ----------------                                                 
understanding and agreement among the parties with regard to the subject matter
hereof.  Nothing in this Agreement, express or implied, is intended to confer
upon any Person, other than the parties hereto and their respective successors
and assigns, any rights, remedies, obligations, or liabilities under or by
reason of this Agreement, except as expressly provided herein.

     16.  GOVERNING LAW.  This Agreement and the transactions contemplated 
          -------------                    
hereby will be governed by the laws of the Commonwealth of Virginia.

     17.  NOTICES.  Unless otherwise provided, any notice required or permitted 
          -------         
under this Agreement shall be given in writing and shall be deemed effectively 
given upon receipt by the party to be notified or on the second following
business day, if delivered by a recognized overnight courier service offering
overnight delivery, or on the third following business day, if such courier
offers second-day delivery, and addressed to the party to be notified (a) if to
the Investors, at the address set forth at the end of this Agreement or at such
other address as such party shall have furnished the Company in writing, or (b)
if to the Company, at its address set forth at the end of this Agreement, or at
such other address as the Company shall have furnished to the parties in
writing.

     18.  SEVERABILITY.  Any invalidity, illegality or limitation on the
          ------------                                                  
enforceability of this Agreement or any part thereof, by any party whether
arising by reason of the law of the respective party's domicile or otherwise,
shall in no way affect or impair the validity, legality or enforceability of
this Agreement with respect to other parties.  If any provision of this
Agreement shall be judicially determined to be invalid, illegal or
unenforceable, the validity, legality and enforceability of the remaining
provisions shall not in any way be affected or impaired thereby.

     19.  TITLES AND SUBTITLES.  The titles of the Sections of this Agreement 
          --------------------  
are for convenience of reference only and are not to be considered in 
construing this Agreement.

     20.  DELAYS OR OMISSIONS; REMEDIES CUMULATIVE.  It is agreed that no 
          ----------------------------------------    
delay or omission to exercise any right, power or remedy accruing to the 
parties, upon any breach or default of the Company under this Agreement, shall
impair any such right, power or remedy, nor shall it be construed to be a waiver
of any such breach or default, or any acquiescence therein, or of any similar
breach or default thereafter occurring; nor shall any waiver of any single
breach or default be deemed a waiver of any other breach or default theretofore
or thereafter occurring.  It 

                                       10

<PAGE>
 
is further agreed that any waiver, permit, consent or approval of any kind or
character by a party of any breach or default under this Agreement, or any
waiver by a party of any provisions or conditions of this Agreement must be in
writing and shall be effective only to the extent specifically set forth in
writing and that all remedies, either under this Agreement, or by law or
otherwise afforded to a party, shall be cumulative and not alternative.

     21.  ATTORNEYS' FEES.  If any action at law or in equity is necessary to 
          ---------------
enforce or interpret the terms of this Agreement, the prevailing party shall be
entitled to reasonable attorney's fees, costs and necessary disbursements in
addition to any other relief to which such party may be entitled.

     22.  COUNTERPARTS.  This Agreement may be executed in any number of
          ------------                                                  
counterparts, each of which shall be an original, but all of which together
shall constitute one instrument.

                           [SIGNATURE PAGE FOLLOWS.]


















                                       11

<PAGE>
 
     IN WITNESS WHEREOF, the parties have executed this Agreement as of the date
first above written.

                              COMPANY:
                              ------- 

                              TEMPLATE SOFTWARE, INC.


                              By:  /s/ E. Linwood Pearce
                                 ------------------------------
                                 E. Linwood Pearce
                                 Chief Executive Officer

                              Address:
                              ------- 
                              45365 Vintage Park Plaza
                              Dulles, Virginia 20166
                              Attn:  Chief Executive Officer

                              INVESTORS:
                              --------- 

                                   /s/ Heinz-Dieter Dietrich
                                 ----------------------------------
                                 Heinz-Dieter Dietrich

                              Address:
                              ------- 
                              c/o Milestone Software, GmbH
                              Airport Center
                              Flughafenstrasse 52a
                              22335 Hamburg, Germany
                              Attn:  Mr. Heinz-Dieter Dietrich

                                   /s/ Klaus-Dieter Jansen
                                 ----------------------------------
                                 Klaus-Dieter Jansen

                              Address:
                              ------- 
                              c/o Milestone Software, GmbH
                              Airport Center
                              Flughafenstrasse 52a
                              22335 Hamburg, Germany
                              Attn:  Mr. Klaus-Dieter Jansen




                                       12