You might be able to do something like: msdev /EX EXPMF ITK.dsw sleep 100 nmake /k /f ALL_BUILD.mak "ALL_BUILD - Debug" with the EXPMF macro in your macros file for MSVC Sub EXPMF() ExecuteCommand "ActivateWorkspaceWindow" ExecuteCommand "SelectAll" ExecuteCommand "BuildProjectExport" Quit End Sub - Ken