stevencohn / OneMore

A OneNote add-in with simple, yet powerful and useful features
Mozilla Public License 2.0
2.62k stars 220 forks source link

Having problems again with the installer #376

Closed 1001QAdotNET closed 2 years ago

1001QAdotNET commented 2 years ago

I totally forgot about the recommendation to upgrade via Check for update Maybe this should be automated and the program should check by itself when it starts and ask the user if he or she wants to update or skip the respective version

So I used the installer to install 4.13 and now OneMore is gone and there is no way to put it back no matter what I do I deleted the %AppData%\OneMore folder but that had no effect

Here is the setup log

OneMore installer running as user NT AUTHORITY\SYSTEM (S-1-5-18) elevated

Register... version 4.13

ProtocolHandlerDeployment.Install ---
step 0: opening HKLM:\Software\Classes\onemore
step 1: creating HKLM:\Software\Classes\onemore
step 2: setting properties of HKLM:\Software\Classes\onemore
step 3: opening HKLM:\Software\Classes\onemore\shell\open\command
step 4: creating HKLM:\Software\Classes\onemore\shell\open\command
step 5: setting properties of HKLM:\Software\Classes\onemore\shell\open\command
verified: key created HKEY_LOCAL_MACHINE\Software\Classes\onemore\shell\open\command

TrustedProtocolDeployment.Install ---
translating user mycomp\1001qa to SID
registering trusted protocol for user  mycomp\1001q (S-1-5-21-2324714714-4207804683-2689708552-1001)
defaulting Office version to 16
step 6: opening HKCU:\Software\Policies\Microsoft\Office\16.0\Common\Security\Trusted Protocols\All Applications\onemore:
key already exists

EdgeWebViewDeployment.Install ---
WebView2 Runtime is already installed
completed successfully
stevencohn commented 2 years ago

OneMore already has the ability to checks for upgrades on startup; this is an option in the main page of the Setup dialog.

Regardless, that option, as well as the Check for Updates action, is exactly the same as if you downloaded the new installer and just ran it as an upgrade on top of your current installation.

If anything weird happens, an explicit uninstall (either from the msi or from Windows' Apps and Features) should clear everything up and get you ready for the next clean install.

Deleting the appdata folder wouldn't help. I think you're remembering the problems from a while back with the settings.xml file but that file hasn't changed in quite a while.

1001QAdotNET commented 2 years ago

So what do I need to delete or do now? Yes I went back to that thread and re-did what I did there I also uninstalled the app via Add remove programs The upgrade went fine on the work laptop (using the built in check for updates)

1001QAdotNET commented 2 years ago

OK after more troubleshooting I had to kill the dllhost process with /Processid:{88AB and I am now seeing the error -OneMore failed to connect to OneNote This (killing the process) could be included in the wiki -the process seems to remain there some times

1001QAdotNET commented 2 years ago

Here is the OneMOre.log

460:1] Starting dllhost 460, CPU=3600Mhz, en-US/en-US, v4.13, OneNote 15.0, Office 15.0 460:1] ..OnConnection(ConnectionMode:ext_cm_Startup,1) 460:1] ..OneAddInsUpdate(custom[]:0) 460:3] ..building ribbon 460:3] ..building ribbon colorizer commands 460:3] ..RibbonLoaded() 460:3] ..OnStartupComplete(custom[]:0) 460:3] ..error starting add-on 460:3] ..System.InvalidCastException Message: Unable to cast COM object of type 'Microsoft.Office.Interop.OneNote.ApplicationClass' to interface type 'Microsoft.Office.Interop.OneNote.IApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{452AC71A-B655-4967-A208-A4CC39DD7949}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)). Source: mscorlib StackTrace: at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) at Microsoft.Office.Interop.OneNote.IApplication.GetSpecialLocation(SpecialLocation slToGet, String& pbstrSpecialLocationPath) at River.OneMoreAddIn.OneNote.GetFolders() at River.OneMoreAddIn.AddIn.OnStartupComplete(Array& custom) TargetSite: [mscorlib] System.StubHelpers.StubHelpers::GetCOMIPFromRCW()

stevencohn commented 2 years ago

OK after more troubleshooting I had to kill the dllhost process with /Processid:{88AB and I am now seeing the error -OneMore failed to connect to OneNote This (killing the process) could be included in the wiki -the process seems to remain there some times

The Check for Upgrade action should shut down OneNote and the dllhost. But I can add a separate check to the installer too.

1001QAdotNET commented 2 years ago

yeah a failed upgrade might leave the process there ...not sure how it ended up like that so what do I do next, based on the above log ?

stevencohn commented 2 years ago

If you've uninstalled, you should be able to reinstall. If it doesn't load, you may need to go into OneNote's File/Options, Add-ins, Manage, and then tick the box next to OneMore to reenable it.

1001QAdotNET commented 2 years ago

It is already enabled, I did not uninstall it so it is still there Enabling/Disabling the addon has the expected effect: it appears and disappears from the ribbon and Task Manager but the log is still showing the above error

Uninstalling and then installing it back has the same effect

1001QAdotNET commented 2 years ago

I tried to put back v4.10...same story as above same error

1001QAdotNET commented 2 years ago

I also cleaned the registries of any key where OneMore was mentioned and I run the Office 2013 repair process. No luck

1001QAdotNET commented 2 years ago

The installer is definitely the problem here By trial and error I learned that I can install any version that has a x86 Installer so please please continue to generate these installers as well The latest version that I was able to install this way was 4.11

At that point I tried to use the Update link available via "About OneMore" Even if it sees the latest version (4.13) when I click on Update nothing happens

I am running CPU=3600Mhz, en-US/en-US, v4.11, OneNote 15.0, Office 15.0 OneNote 2013 32bits

stevencohn commented 2 years ago

You mentioned another machine? It has OneNote 32bit as well? Or is that 64bit?

1001QAdotNET commented 2 years ago

no the laptop runs an x64 version https://i.imgur.com/sUy57ZN.png

stevencohn commented 2 years ago

Good news, I'm able to reproduce the COM InvalidCastException you saw

1001QAdotNET commented 2 years ago

That is great. So is it the installer or somerhing else. I have had so many problems with the updates that I am getting anxious when I have to do ir

stevencohn commented 2 years ago

It is indeed the installer when applied on top of 32-bit OneNote. The next release will fix this. Highest priority.

stevencohn commented 2 years ago

There's a pre-release test installer here if you'd like to give it a try: https://github.com/stevencohn/OneMore/releases/tag/4.13.1

1001QAdotNET commented 2 years ago

I will give it a try in like 2h, thank you!

1001QAdotNET commented 2 years ago

I can confirm that this worked and I am now on 4.13.1 using the pre-release installed linked above. It had no more questions about the way OneNote was installed thanks a lot!