Any way around this?

M

Maz

Hi,

I have develooped a VSTO 2005 SE Excel addin. In order to function properly
I need, in the code, to disable a "bad" addin - one that interferes
inappropriately with my addin.

This works when I run Excel with an administrator account but it throws an
error when run with non-admin rights.

The error is "The connected state of Office Add-Ins registered in
HKEY_LOCAL_MACHINE cannot be changed."

Googling this seems to be a Microsoft security issue. Any ideas?



private void UnloadBadAddins(bool unloadAddin)
{
const string badAddin = "iManage Excel2000 integration (Ver 1.3)";

foreach (Office.COMAddIn addin in this.ExcelApp.COMAddIns)
{
if (addin.Description.ToUpper().Contains(badAddin.ToUpper()))
{
if (addin.Connect == unloadAddin)
{
addin.Connect = !unloadAddin; //ERROR THROWN HERE
return;
}
}
}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top