Microsoft Attack Surface Analyzer is a nice tool to analyze the modifications made by a product. Many a times we may need to automate this. Microsoft provided command line options to automate this.
Usage: Attack Surface Analyzer.exe [arguments]
/Baseline <file> – baseline cab file
/Product <file> – product cab file
/Report <file> – report HTML/MHT file with the output of the analysis results
/NoReportLaunch – will prevent opening the report file in the default web browser after the analysis is complete