Process of manually installing a Revit 2011 add-in:
I can easily accomplish the first step with a Visual Studio 2008 Setup Project. For second step, I probably need to use Custom Action that would create xml .addin file. I don't know how to pass information(output location) from an installer to Custom Action.
Open up the custom actions editor where you will see folders for each phase of installation or uninstallation (Install, Commit, Rollback, Uninstall). Under each folder you will add references to your custom actions.
Select one of these custom actions and look at the properties. There will be a property called CustomActionData which is where you map values from the installer to the custom action.
An example of the format of this property is shown below.
/installLocation="[ProgramFilesFolder][ProductName]" /setting1="[SETTING1]"
Then inside your custom action class you can write the following to access this values
string path = this.Context.Parameters["installLocation"];
string setting1 = this.Context.Parameters["setting1"];
Also you shouldn't be referencing an absolute path when writing the Revit addin file. Instead you can do the following to find the AppData folder regardless of what OS is being used.
private string AddInManifestPath()
{
string appdata = System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonApplicationData);
string path = System.IO.Path.Combine(appdata, @"Autodesk\REVIT\Addins\2011\DVAMC.addin");
return path;
}