sytone / OneNotePowerShellProvider

A PowerShell provider for OneNote.
Other
33 stars 16 forks source link

missing OneNotePowershell.msi #4

Open Verayth opened 5 years ago

Verayth commented 5 years ago

Please provide a working OneNotePowershell.msi installer, and/or instructions on how to build it from source. The link to the file in various blogs no longer works. It'd be nice if it was posted as a release here on GitHub.

I was able to get a good compile in VS 2017 and DotNet4.8 after a bit of work, but I don't believe I know how to correctly register the snap-in with Powershell. That's assuming I didn't break something.

If I just use an Import-Module on the DLL, I get a 'class not registered' error using the Open-OneNote command. The OneNote provider shows up OK with Get-PSDrive.

Open-OneNote : Retrieving the COM class factory for component with CLSID {D7FAC39E-7FF1-49AA-98CF-A1DDD316337E} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Verayth commented 5 years ago

So the error is most likely that I only have "OneNote for Windows 10" installed, and that and OneNote 2019 don't yet support API access. I will test it on my work PC when I get a chance.

https://answers.microsoft.com/en-us/msoffice/forum/all/onenote-2019-api-for-plug-ins/b889eb48-bd95-4b94-b527-00d8d01d6833

I was able to generate a PSD1 manifest for the module using the following command for a smoother import, and hopefully get it to load all required dependencies.

New-ModuleManifest -Path Microsoft.Office.OneNote.psd1 -Author sytone -CompanyName Microsoft -ModuleVersion 1.5.0.1 -Description "OneNote Powershell" -FormatsToProcess "OneNote.ps1xml" -RequiredAssemblies @("WebNotebook.dll") -NestedModules @() -Copyright "" -ModuleToProcess "Microsoft.Office.OneNote.PowerShell.dll" -TypesToProcess @() -FileList @()
queks commented 4 years ago

Did you manage to find the .msi file?

sytone commented 4 years ago

no, I searched through local files and did not find it. Will keep looking.

Sent from Outlookhttp://aka.ms/weboutlook


From: queks notifications@github.com Sent: Tuesday, May 12, 2020 4:52 PM To: sytone/OneNotePowerShellProvider OneNotePowerShellProvider@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [sytone/OneNotePowerShellProvider] missing OneNotePowershell.msi (#4)

Did you manage to find the .msi file?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/sytone/OneNotePowerShellProvider/issues/4#issuecomment-627660636, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKVVEZ252UROV7CQHZB5NLRRHOMZANCNFSM4IPYJLNQ.

queks commented 4 years ago

Thanks. I tried looking for it from the original blog, but the OneDrive link the author points to is no longer valid.