The values to write are different for each file so there is not so much cleanup that can be done. Cleaned up the screen output by adding $rc = in front of each Writeprofilestring line. This eliminates all the return codes being displayed on the screen.

 Code:
Copy "d:\Backups\EXMERGE.ini" "d:\Backups\EXMERGE.tmp.ini"
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SourceServerName", "BENSMTP")

;==================================
;Exmerge 2007
;==================================
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "DataDirectoryName", "D:\Backup_temp\exchange\ben\2007")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageStartDate", "01/01/2007  00:00:00")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageEndDate", "12/31/2007  23:59:59")
Shell $exmergeexe

;==================================
;Exmerge 2008
;==================================
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "DataDirectoryName", "D:\Backup_temp\exchange\ben\2008")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageStartDate", "01/01/2008  00:00:00")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageEndDate", "12/31/2008  23:59:59")
Shell $exmergeexe

;==================================
;Exmerge 2009
;==================================
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "DataDirectoryName", "D:\Backup_temp\exchange\ben\2009")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageStartDate", "01/01/2009  00:00:00")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageEndDate", "12/31/2009  23:59:59")
Shell $exmergeexe

;==================================
;Exmerge 2010
;==================================
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "DataDirectoryName", "D:\Backup_temp\exchange\ben\2010")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageStartDate", "01/01/2010  00:00:00")
$rc = WriteProfileString ("d:\Backups\EXMERGE.tmp.ini", "EXMERGE", "SelectMessageEndDate", "12/31/2010  23:59:59")
Shell $exmergeexe

Del 'd:\Backups\EXMERGE.tmp.ini'
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.