LoadBehavior changes from 3 to 2 in excel addin
-
Tuesday, October 16, 2007 1:33 PM
Hi,
I have created an Addin for Excel 2007 using VSTOSE and trying to deploy. I tried to deploy using the automatically
generated Setup project and everything works fine for the first instance. When I close the excel application and open again the Addin is loaded but doesn't show the custom ribbon.When I checked "Office Button --> Excel Options --> Add-ins --> COM Add-ins --> MyExcelAddin" the addin is loaded but in unchecked state. I checked the registry and the Loadbehaviour is changed from initial 3 to 2.
(HKCU--S/w-->MS-->Office-->Excel --> Addins--> MyExcelAddin)
I have added setsecurity project mentioned in the walkthrough and added custom actions. Do I need to do anything more on this security options?
I have downloaded and installed the fix also from the below mentioned location but of no use.
http://support.microsoft.com/kb/908002
Any help would be appreciated.
Thanks,
Mohan
All Replies
-
Tuesday, October 16, 2007 3:16 PM
Mohan,
Excel may have "blacklisted" the add-in due to an error (which has not necessarily generated any error message). So when you experience the issue again select the "Disabled items" instead of "COM Add-ins". -
Tuesday, October 16, 2007 3:31 PM
Hi Dennis,
Thanks for your reply. I have checked "disabled items" but couldn't find my excel add-in. But the addin is residing in "Inactive Application Add-ins". Is there anyway to solve this problem so that the addin should be loaded at startup (Loaded but unchecked)?
Thanks,
Mohan
-
Tuesday, October 16, 2007 5:11 PM
Mohan,
I suspect it may be related to the CAS setting for the project - please see the answer to a similar question in the following thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=888712&SiteID=1
-
Wednesday, October 17, 2007 6:17 AM
Hi Dennis,
I have gone through the post you suggested and the problem I am facing is exactly the same one. But I could not find solution and I have no idea on how he fixed the problem.
I have added Security project to my addin and created custom actions as mentioned in the walkthrough. It sets CAS security for the installed addin. I have checked this in the below mentioned path.
Control Panel --> Administrative tools --> .Net Framework 2.0 Configuration --> My Computer --> Runtime Security Policy --> User --> MyName.MyExcelAddin --> MyExcelAddin. It has been set to FullTrust only.
I checked with Caspol.exe using the command Caspol -u -lg and it says the location is provided Full Trust.
I don't know how to proceed further.
I created another wordaddin and added the same security project and it works fine. Is there any workaround to fix this.
Thanks
Mohan
-
Wednesday, October 17, 2007 9:33 AM
Mohan,
I don't know how to proceed further.If You create a simple Excel project, apply the same CAS to it and then test it? You can also send me a copy of the project if possible.
-
Thursday, October 18, 2007 5:01 AMHi Dennis,
Can you provide me your mail id so that I can send the project copy.
Thanks -
Thursday, October 18, 2007 8:11 AM
Mohan,
Put together the following:
dennis
_
wallentin
@
hotmail.com
-
Sunday, July 06, 2008 3:01 PM
Today I encountered a similar problem with IDTExtensibility2 Addin,
It took me the better part of a day to nail it down:
after a lot of investigating, I noticed that when I change the GuidAttribute, the problem is gone,
this was a major step to the solution. upon investigating, I noticed that
HKEY_CLASSES_ROOT\CLSID\{[GuidAttribute]}\InprocServer32\
Contains Two sub-keys, each belongs to a different version of the assembly.
(one belongs to an older version)
after I removed the whole HKEY_CLASSES_ROOT\CLSID\{[GuidAttribute]} key, and RegAsm / reinstalled my Addin,
the problem went away.
I guess having two registered versions (by accident) caused a failure in the Addin loader, which caused it to disable the addin.
Hope I was of assistance,
Tal Aloni
-
Friday, April 17, 2009 7:53 AM
Hi Tal,
I am exactly having the same issue when i uninstall my Newer version and installed my Older version addin,i am not able to get my CommandBar loaded on Startup,even if the COM Addin is not getting loaded.->I deleted the whole GUID entry and reinstalled my Old ComAddin but i have still the issue
If i am missing something while deleting ,please help me on this isse.
You told :(after I removed the whole HKEY_CLASSES_ROOT\CLSID\{[GuidAttribute]} key, and RegAsm / reinstalled my Addin,)
My Question:What is the RegAsm you did there.Can you tell me
Thanks
Das
Dwipayan Das -
Monday, May 30, 2011 8:13 AM
i am also having the almost similar problem.
We have made a word 2003 Addin but when we are trying to install our Addin for all user , it is not working as expected .when admin account user install it for all user then it work only for his account but not for other users. It does not even show in com Addin on toolbar.
As we can judge, our registry entry settings are correct under both HKCU and HKLM.we have kept same registry settings for both HKCU and HKLM.are we have to do something different than these settings?
I am attaching a picture which tells about registry entry setting of our word 2003 Addin .
https://picasaweb.google.com/shashank03jan/General02?feat=directlink
We are using caspol security policy for granting full trust to assembly. We grant full trust to machine level.
User is admin so there is no issue of permission or privileges.
I have gone through an article http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/1435e0d4-19d0-4b3f-98af-558007ab760d/ . but it did not solve our problem.
I want to give you some more info about environment
• Visual studio 2008
• Visual studio 2005 tools for office second edition runtime
• Visual studio built in setup and deployment.
• We have found one strange situation that when we install word 2003 Addin for all user by admin account ,here Addin loads fine ,and then switching to another admin account Addin does not load but again switching to previous admin account and opening word 2003 again , but this time Addin does not load.
Then we found that loadbehaviour from registry entry under HKLM is changed to “2” .
Thanks Shashank shekhar
- Edited by anupambakshi Monday, May 30, 2011 12:16 PM
-
Monday, May 30, 2011 9:50 AM
Hi Shashank,
I saw your screen shot not sure what add-ins are registered under HKey_Local_Machine. In order to install an office add-in for all users it has to register under HKEY_Local_Machine.
This may hep you :http://blogs.msdn.com/b/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspx
Please let me know if this works for you .
Thanks
Dwipayan
Dwipayan Das -
Monday, May 30, 2011 11:51 AM
Hello Dwipayan,
thanks for replying. your mentioned link is good but i think it is for office 2007 also it is a work around fix for making office 2007 addin visible to all user.
but my problem is with word 2003.when admin user install it for all user , it works fine for his account . When he switches to another user and open word 2003 ,addin does not load and load behavior changes to 2 from 3 . now admin also can not see his addin in his account also .
for your information i want to tell you that registry settings are kept same for both HKCU and HKLM. will i have to do any thing else in registry settings .
strange is that addin works fine for current user who install it so there is no possibility of unhandaled exceptions.i have used VSTO_SUPPRESSDISPLAYALERTS and VSTO_LOGALERTS also to find problem,but no help.
if you want i can send you more information whatever you want .
please do remember our primary question i.e. Word 2003 addin installation for all user ?
waiting for your reply .
Thanks
Shashank shekhar
-
Monday, May 30, 2011 1:24 PM
Hello all ,
please help me to find my solution.my problem is stated above in different boxes.
thanks
shashank shekhar
-
Thursday, June 02, 2011 1:19 PM
Hey Anup,
Sorry for the delayed response .Looks to be a permission level issue only.
Can you send me your sample code to me in the following id ,
das.dwipayan
@
hot
mail
.
com
I want to verify it at my end.
Thanks
--Dwipayan
Dwipayan Das -
Friday, June 03, 2011 1:23 PM
HI Dwipayan Das
Thank you for prompt reply .but still problem is not solved . i dont know what is wrong in my code . but till now i am able to find that Load behavior is changing from 3 to 2 . and there is no unhandlled exception , also i m giving full machine permission . the problem becomes more strange when i install my word 2003 addin by administrator account user ,it works fine ( it means no unhandelled exception) but switching to another user ,addin does not load and load behavior is changed to 2 .
so i decided to create a demo addin project ,i also used default setup and deployment project which is already added by visual studio 2008. this demo project runs perfectly fine for every account user .than i compared both project but everything was same which is necessary to run addin for each user account , so finally i decided to move my all project files and code to this demo project . now my addin works fine for each user account .this gave me a solution but did not solved my problem.
as a challenge , i am still looking for finding my problem and solution .
thanks and regards
shashank
-
Friday, June 03, 2011 1:24 PM
hi Dwipayan Das
i will try to send you my project .
thanks
shashank
-
Thursday, June 09, 2011 12:03 PM
Hi Shashank,
What type of deployment technique you are using.
If you are using Visual studios setup & deployment then create the registry entries while development and try to load the add-in.
The following article says the same:
http://msdn.microsoft.com/en-us/library/bb386106.aspx
See this too :http://support.microsoft.com/kb/976811/en-us (Very useful)
More reference to the same issue:
Try some of these if it helps :
Do you have the runtime installed for the non-admin user account.
http://support.microsoft.com/kb/908002
Thanks
Dwipayan Das
Dwipayan Das

