Well waiting for a answer I figuerd out somethign that is the nearest solution for our needs.
He made a method in our ERP that checks if the Add-In is instaled in Outlook and if it is not it starts the Setup fil of the Add-In.
private static void InstallOutlookAddIn()
{
Outlook.Application application=GetApplicationObject();
bool addInInstalled = false;
string AddinName = "OutlookCSArchiving";
string SetupPath = @"\\nas01\public\ICS\Projekte\ERP\Setups\Outlook\setup.exe";
foreach (COMAddIn addin in application.COMAddIns)
{
if (addin.Description.ToString() == AddinName)
{
addInInstalled = true;
addin.Connect = true;
}
}
if(!addInInstalled)
Process.Start(SetupPath);
}
private static Outlook.Application GetApplicationObject()
{
Outlook.Application application = null;
if (Process.GetProcessesByName("OUTLOOK").Count() > 0)
{
application = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application;
}
else
{
application = new Outlook.Application();
}
return application;
}
If someone knows a bether way of deploing a Outlook Add-In over an ERP let me know.