/// <Summary>
/// Register COM +
/// </Summary>
/// <Param name = "assembly"> </param>
/// <Param name = "strErrorMessage"> </param>
/// <Returns> </returns>
Public static bool Install (string assembly, ref string strErrorMessage)
{
Bool flag = true;
String applicationName = string. Empty;
String typeLibraryName = string. Empty;
Try
{
Flag = true;
RegistrationHelper helper = new RegistrationHelper ();
Helper. InstallAssembly (assembly, ref applicationName, ref typeLibraryName, InstallationFlags. CreateTargetApplication );
StrErrorMessage = string. Empty;
}
Catch (Exception ex)
{
Flag = false;
StrErrorMessage = ex. Message;
// Throw;
}
Return flag;
}
/// <Summary>
/// Unload COM +
/// </Summary>
/// <Param name = "assembly"> </param>
/// <Param name = "strErrorMessage"> </param>
/// <Returns> </returns>
Public static bool UnInstall (string assembly, ref string strErrorMessage)
{
Bool flag = true;
String applicationName = string. Empty;
String typeLibraryName = string. Empty;
Try
{
Flag = true;
RegistrationHelper helper = new RegistrationHelper ();
Helper. UninstallAssembly (assembly, applicationName, typeLibraryName );
StrErrorMessage = string. Empty;
}
Catch (Exception ex)
{
Flag = false;
StrErrorMessage = ex. Message;
// Throw;
}
Return flag;
}
}