Closed mwalter027 closed 6 months ago
mwalter,
Hey Rodney,
I have unlock the zip, go into the folder and start your ps1. No effect ^^
PS C:\Users\DE119599\Downloads\ODSyncLib64> .\Get-ODStatus.ps1
MaxSize: 4096 / Type: uint64
Exception calling "GetODSyncStatus" with "4" argument(s): "Unable to load DLL 'ODSyncLib.dll': The specified module
could not be found. (Exception from HRESULT: 0x8007007E)"
At C:\Users\DE119599\Downloads\ODSyncLib64\Get-ODStatus.ps1:42 char:5
+ $HRESULT = [ODSyncLib]::GetODSyncStatus($IgnoreQuota, $Result, $M ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DllNotFoundException
C:\Users\DE119599\Downloads\ODSyncLib64\Get-ODStatus.ps1 : Call to GetODSyncStatus failed. HRESULT:
At line:1 char:1
+ .\Get-ODStatus.ps1
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ODStatus.ps1
C:\Users\DE119599\Downloads\ODSyncLib64\Get-ODStatus.ps1 : Size: 0
At line:1 char:1
+ .\Get-ODStatus.ps1
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-ODStatus.ps1
Status = "Error"
HRESULT = $HRESULT
Size = $Size
PS C:\Users\DE119599\Downloads\ODSyncLib64>
Maybe it is helpful, that the machine is a Windows 10 machine upgraded with IPU to Windows 11.
Hey Rodney I have also test your script on a native Windows 11 23H2 Device and get the same result.
Cheers Mike
Could you elaborate on the steps you took?
From: mwalter027 @.> Sent: Thursday, March 7, 2024 1:30:41 AM To: rodneyviana/ODSyncUtil @.> Cc: Comment @.>; Subscribed @.> Subject: Re: [rodneyviana/ODSyncUtil] Cannot load ODSyncLib.dll with powershell (Issue #12)
Hey Rodney I have also test your script on a native Windows 11 23H2 Device and get the same result.
Cheers Mike
— Reply to this email directly, view it on GitHubhttps://github.com/rodneyviana/ODSyncUtil/issues/12#issuecomment-1982744048 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGT5MATKJMH5XW3ULQZFVPDYXAJSDBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE3TKMBQGM3TOMZUQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRSGE3DGNJSG4ZTAMFHORZGSZ3HMVZKMY3SMVQXIZI. 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.
Hey Rodney. to 1. the latest Version Zip to 2. yes to 3. both to 4. Yes, the exe works as expected. to 5. Yes. to 6: Output:
ODSyncUtil - OneDrive Synchronization Utility Version 1.0.5.5000
Copyright (c) 2024 Rodney Viana (https://github.com/rodneyviana/ODSyncUtil)
MIT License
Usage: ODSyncUtil [options]
-h Show this help message
-s <filename> Save the output to file (UTF-8 unicode based on locale code page)
-d Debug the application
-q Ignore quota information (avoid crash situations)
I would primary use the dll Version while i need it as part of Powershell with XAML script.
CHeers Mike
On terms of results, using the script that uses the .EXE and the one using the DLL are the same. Anyway, if the .EXE is working, there is no reason the DLL is not. You may have a DLL that is somehow corrupted, I've seen this happens because of antivirus. To check this, use PowerShell to calculate the Hash. It should match the results that I have:
Get-FileHash .\ODSyncLib.dll -Algorithm SHA256 | Select Hash
Hash
----
C301D41A6640FE2D8FA7F9A8039BC42465196B99D6408E11CFFD5D54AE7D6083
Closing for inactivity
Hey rodney.
If i try to load the dll within Powershell, i get the message,
If i use the ps1 File, i get this error Message:
Any idea?
Cheers Mike