rodneyviana / ODSyncUtil

MIT License
16 stars 5 forks source link

Not working on Win10 22H2 #3

Closed crcobb closed 8 months ago

crcobb commented 9 months ago

After compiling and adding back in your debug statements I'm getting a 80004002 error from the QueryInterface call.

My output looks like...

QueryInterface: 80004002 QueryInterface: 80004002 QueryInterface: 80004002 QueryInterface: 80004002 QueryInterface: 80004002 QueryInterface: 80004002 QueryInterface: 80004002 [{"SyncRootId":"OneDrive!S-1-5-21-329068152-839522115-682003330-11452!Business1|eb4e1664b92a4c838f93377c53fc2d04","CurrentState":0,"Sid":"S-1-5-21-329068152-839522115-682003330-11452","UserName":"","ServiceName":"Business1","Label":"","IconUri":"","isQuotaAvailable":false,"TotalQuota":0,"UsedQuota":0,"QuotaLabel":"","IconColorA":0,"IconColorR":0,"IconColorG":0,"IconColorB":0}]

Based on my reading that error is No Such Interface Supported. Reading the API documents it is unclear to me if this is implemented for any version of Win10, the Win10 machine I'm using is fully patched and current. This app works perfectly on a Win11 machine.

rodneyviana commented 9 months ago

crcobb,

This is how you can make it work. I created a proxy stub for Windows 10, but no matter how hard I tried, I couldn't make it work for 64-bit. So the solution I suggest is this:

  1. Download the 32-bit COM proxy stub for OneDrive here: https://github.com/rodneyviana/ODSyncService/blob/master/Binaries/Beta/OneDriveFlyoutPS.dll
  2. Don't forget to unblock the download (right click | Properties... | Unblock)
  3. You then install this component using the 32-bit regsrv32 from C;\Windows\SysWOW64 (replace c:\temp\ by the folder where OneDriveFlyoutPS.dll is installed):
    cd C:\Windows\SysWOW64
    regsvr32 /i c:\temp\OneDriveFlyoutPS.dll
  4. If you did it correctly, a window will pop-up and tell you the component is registered (do not register it in Windows 11 as the proxy stub already exists)
  5. Now you will have to use the 32-bit version of the .exe file. The PowerShell script can run from PowerShell 64-bit as it will capture just the output of the C++ app

For the sake of others, let me know if it works and I will add this to the documentation.

Thanks,

Rodney

crcobb commented 9 months ago

Rodney, I believe I have exactly followed your directions and here are my results. If I use regsvr32 /i c:\temp\OneDriveFlyoutPS.dll I receive this error

image

Getting rid of the /i option I get a successful register dialog box and I can see this classid created in the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{9623990B-1B26-5F45-9F95-43D43B1CFD4C}

The output I get from running ODSyncUtil.exe (32bit Version) is just [].

Anything I can try? Currently I'm using ODSyncUtil and ODSyncService with logic to choose based on OS Version in my code. Chris

rodneyviana commented 9 months ago

Hi ccrobb,

I am sorry for my confusion. OneDriveFlyoutPS.dll is actually 64-bit and does not work in 32-bit system. I got it mixed up (too long) So run regsvr32 from C:\Windows\System32 using the same syntax. You need to run regsvr32 as ADMINISTRATOR. You will receive an error message that is actually a warning. The Proxy/Stub has no DLLMAIN (no code actually, just the COM definition). So, after you install the COM definition, you just need run the 64-bit version this time and it will work. I provisioned a Windows 10 virtual machine, tested using these steps and it worked like a charm. I got the message that there is no DLLMAIN, but it works well. To uninstall the Proxy/Stub, just run with "/u": regsvr32 /u c:\temp\OneDriveFlyoutPS.dll Which can be also used to test if it was installed in first place. Let me know if you have any problem this time, but this is it. The bad news is that I can't find the source code. But it's somewhere in my cloud.

PLEASE DON'T FORGET: this time you need to run the 64-bit version of ODSyncUtil.

Thanks, Rodney


From: crcobb @.> Sent: Wednesday, February 7, 2024 7:52 PM To: rodneyviana/ODSyncUtil @.> Cc: Comment @.>; Subscribed @.> Subject: Re: [rodneyviana/ODSyncUtil] Not working on Win10 22H2 (Issue #3)

Rodney, I believe I have exactly followed your directions and here are my results. If I use regsvr32 /i c:\temp\OneDriveFlyoutPS.dll I receive this error

image.png (view on web)https://github.com/rodneyviana/ODSyncUtil/assets/1474340/7a249d52-e51a-4dc4-9021-377251a5e394

Getting rid of the /i option I get a successful register dialog box and I can see this classid created in the registry.

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{9623990B-1B26-5F45-9F95-43D43B1CFD4C}

The output I get from running ODSyncUtil.exe (32bit Version) is just [].

Anything I can try? Currently I'm using ODSyncUtil and ODSyncService with logic to choose based on OS Version in my code. Chris

— Reply to this email directly, view it on GitHubhttps://github.com/rodneyviana/ODSyncUtil/issues/3#issuecomment-1933241768 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGT5MATX2XMQ4EA3CKMFK63YSQVUVBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE3TKMBQGM3TOMZUQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRSGEYTSMRSGU3DAN5HORZGSZ3HMVZKMY3SMVQXIZI. You are receiving this email because you commented on the thread.

Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

crcobb commented 9 months ago

Rodney, I did as you outlined and I'm receiving this as a result. Similar/same and I was receiving with my initial testing before reporting the issue. I have both a business and personal OneDrive process running on this machine, along with several synced folders, only minimal data is being returned for the business account. Below is the output of testing with OneDrive waiting for sign-in and with a signed in account. The current state is showing as zero for both tests. I'm using the 64 bit version and registered the DLL as outlined.

OneDrive waiting for signin.

C:\temp>ODSyncUtil.exe
[{"SyncRootId":"OneDrive!S-1-5-21-329068152-839522115-682003330-11452!Business1|eb4e1664b92a4c838f93377c53fc2d04","CurrentState":0,"Sid":"S-1-5-21-329068152-839522115-682003330-11452","UserName":"","ServiceName":"Business1","Label":"","IconUri":"","isQuotaAvailable":false,"TotalQuota":0,"UsedQuota":0,"QuotaLabel":"","IconColorA":0,"IconColorR":0,"IconColorG":0,"IconColorB":0}]

OneDrive Up to date

C:\temp>ODSyncUtil.exe
[{"SyncRootId":"OneDrive!S-1-5-21-329068152-839522115-682003330-11452!Business1|eb4e1664b92a4c838f93377c53fc2d04","CurrentState":0,"Sid":"S-1-5-21-329068152-839522115-682003330-11452","UserName":"","ServiceName":"Business1","Label":"","IconUri":"","isQuotaAvailable":false,"TotalQuota":0,"UsedQuota":0,"QuotaLabel":"","IconColorA":0,"IconColorR":0,"IconColorG":0,"IconColorB":0}]

Thanks, Chris

rodneyviana commented 8 months ago

Chris,

Checking how things are with new version. If it is still broken, send me the output of:

ODSyncUtil.exe -d
rodneyviana commented 8 months ago

Closing for inactivity