Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5845881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:29:53+00:00 2026-05-22T12:29:53+00:00

I’ve been trying to track down why my Office2010 plugin leaves a null pointer

  • 0

I’ve been trying to track down why my Office2010 plugin leaves a null pointer exception during uninstall and the 2007 version does not. (Edit: 2007 is at same state as 2010 – FAIL)

To narrow it down I have put in a couple of eventlog traps, meaning if code reaches this point – I should get something in the Eventlog. No such luck. Now either I written the eventlog trap wrong or code doesn’t reach that point.

In the CustomSetupActions – ClickOnceInstaller.cs

    public void Uninstall(System.Collections.IDictionary savedState)  
    {  
        // write something to eventlog  
        // This is not being fired, the exception doesn't reach here or writing to eventlog fails.  
        if (!EventLog.SourceExists("OfficePlugin"))  
        {  
            EventLog.CreateEventSource("OfficePlugin", "Application");  
        }  
        EventLog.WriteEntry  
            ("OfficePlugin"  
            , string.Format("Uninstalling: (bug hunting)"), EventLogEntryType.Information);

        string deploymentLocation = (string)savedState["deploymentLocation"];
        if (deploymentLocation != null)
        {
            string arguments = String.Format(
                "/S /U \"{0}\"", deploymentLocation);
            ExecuteVSTOInstaller(arguments);
        }
    }

As for the ExecuteVSTOInstaller(string arguments)

2007 refers to: string subPath = @"Microsoft Shared\VSTO\9.0\VSTOInstaller.exe";
2010 refers to: string subPath = @"Microsoft Shared\VSTO\10.0\VSTOInstaller.exe";

If the first trap had fired, this is where I would have placed the trap afterwards.

—

I have another method that handles the registration db

RegisterOffice2010AddIn.cs

    public void UnRegisterAddIn(string applicationName, string addInName)
    {

Next line is precisely the same eventlog trap as I just used/shown.

Difference between the two (2007 vs 2010).

    private const string UserSettingsLocation =
        @"Software\Microsoft\Office\12.0\User Settings";

vs

    private const string UserSettingsLocation =
        @"Software\Microsoft\Office\14.0\User Settings";

I can’t think of any other place that might be interesting to place the trap. I have a CustomInstaller which doesn’t do anything besides Dispose(bool disposing) and InitializeComponent()

Development:

Action start 14:21:00: PublishFeatures.
Action ended 14:21:00: PublishFeatures. Return value 1.
Action start 14:21:00: PublishProduct.
Action ended 14:21:00: PublishProduct. Return value 1.
Action start 14:21:00: InstallExecute.
MSI (c) (B8:BC) [14:21:01:013]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg

Error 1001. Error 1001. An exception occurred while uninstalling. This exception will be ignored and the uninstall will continue. However, the application might not be fully uninstalled after the uninstall is complete. –> Object reference not set to an instance of an object.
DEBUG: Error 2769: Custom Action _EE8A0D36_BE55_421F_9A55_95470C001D87.uninstall did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: _EE8A0D36_BE55_421F_9A55_95470C001D87.uninstall, 1,
Action ended 14:21:05: InstallExecute. Return value 3.
Action ended 14:21:06: INSTALL. Return value 3.

Googling the Error 2769 – gives an answer of “[TARGETDIR]\” , but I dont reference TargetDir, I reference deploymentLocation. And Yes I have tried adding the “\” to places I could think of. Including the setup – Registry – HKLM\Software\MS\Office\12.0\ …etc… \Addins\Excel/Word/Outlook and the Manifest keyvalue. Gave no feedback, good or bad, errors or otherwise. I’m at a loss what else to try to hunt this one down.

I have a guess it is referencing to this, in the VDPROJ:

{
“Name” = “8:UnregisterOutlookAddIn”
“Condition” = “8:”
“Object” = “8:_73E71A44EB72485AB7367745F7D57F49”
“FileType” = “3:1”
“InstallAction” = “3:4”
“Arguments” = “8:”
“EntryPoint” = “8:”
“Sequence” = “3:3”
“Identifier” = “8:_EE8A0D36_BE55_421F_9A55_95470C001D87”
“InstallerClass” = “11:TRUE”
“CustomActionData” = “8:/addinName=\”OUR.Outlook.Outlook2010AddIn\” /application=\”Outlook\””
}

I found it throws two exception – the secondary under CustomSetupActions and UnregisterAddIn and the primary under ClickOnceInstaller and Uninstall. Howcome I mention them as 2ndary and primary. Well it will do the exception in CustomAction and then the killing one in ClickOnce. I’ve eliminated the one in CustomActions and I now only have to worry about the ClickOnce. From what I can gather the ClickOnce implements the interface specified in the Setup Project (Install, Rollback, Commit, Uninstall). I only have to figure out how it can run amiss the Uninstall method.

Disclaimer: Unless ofcourse I’m mistaken and is barking up the wrong tree.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:29:54+00:00Added an answer on May 22, 2026 at 12:29 pm

    Change to WiX. It became a workaround as the original is still true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm looking for suggestions for debugging... If you view this site in Firefox or
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.