Files
synology-thumbgen/.specstory/history/2025-09-28_20-12Z-fixing-thumbnail-generation-and-sync-issues.md

263 lines
12 KiB
Markdown
Raw Permalink Normal View History

2025-10-12 16:08:36 -06:00
<!-- Generated by SpecStory -->
<!-- cursor Session fbeac01b-6975-4183-b688-1ea10fb52994 (2025-09-28 20:12Z) -->
# Fixing thumbnail generation and sync issues (2025-09-28 20:12Z)
_**User (2025-09-28 20:12Z)**_
Wtf is this shit. I have the sync mode set to turn off on demand sync, which should DISABLE thumbnailing. I think the synology drive client app updating reset registry changes or something? let's fix them. context: @2025-06-26_04-09Z-fixing-thumbnail-issues-for-video-formats.md @2025-06-26_05-09Z-using-custom-thumbnails-for-blend-files.md @2025-06-26_05-53Z-using-generated-thumbnails-for-blendfiles.md @2025-06-29_22-31Z-thumbnail-generation-issues-on-network-shares.md @2025-07-01_14-38Z-disabling-sync-destruction-for-local-thumbnails.md
---
_**Assistant (default)**_
<think><details><summary>Thought Process</summary>**Addressing sync issues**
I need to respond to the user's frustration about fixing registry keys that are affected by the Synology Drive Client app updates. They want to disable on-demand sync or prevent thumbnail overrides. Ill provide step-by-step PowerShell commands to help them re-apply those registry modifications and possibly disable Cloud Files On-Demand for specific sync roots. This involves checking the registry paths and setting the right policies for effective management. It's a bit complicated, but we'll get through it together!
**Examining thumbnail issues**
Im looking into the policies related to disabling File On-Demand for OneDrive, specifically the "UseOneDriveFilesOnDemand" setting; a value of 0 disables it. However, thats just for OneDrive. For third-party providers, Im considering options like "DisableIconOverlayHandler," but Im not sure how it works. The tricky part is addressing the thumbnail overrides caused by the cloud provider. I might explore unregistering the Sync Root or modifying the right registry keys to effectively manage this issue. It's quite complex, but Im here to help!
**Exploring thumbnail handling**
I'm digging into the thumbnail provider for OneDrive, which might be linked to a specific CLSID, like {BBACC218-34EA-4666-9D7A-C78F2274A524} for overlays. OneDrive utilizes the "Cloud Files Shell Extension," with its own CLSID. I could suggest using ShellExView to find and disable the "Thumbnail Handler" specifically for the Synology extension. The user wants registry edits, so Ill guide them through blocking the cloud provider shell extensions by adding the relevant CLSIDs to the Blocked section in the registry. It's a bit intricate, but we'll get it sorted out!
**Considering file type overrides**
Im looking into using per-extension overrides by registering Icaros providers for file types like .webm and .psd in the registry. Icaros supports various file types, and while it seems to work for .psd, the user mentions .webm is only functioning locally and not in the cloud. That could imply differences in provider precedence. I think I should suggest a script to re-apply the overlay removal keys for OneDrive and adjust some policies. We can definitely offer a PowerShell script for these adjustments!
**Planning registry adjustments**
Im exploring options for toggling provider registration. If the app updates, it might re-enable the Sync Root provider. Deregistering the provider by deleting keys under SyncRootManager could disable cloud attributes for Synology Drive, making it operate as a full sync instead of on-demand.
Ill propose commands to remove specified keys, backup registry entries, and restart services to apply these changes efficiently. Along the way, I'll clarify how to ensure the overlay icons and thumbnail issues are resolved. It might feel complex, but Ill keep the steps straightforward and user-friendly!
**Providing Registry Instructions**
Im guiding the user to block Synology's shell extensions using ShellExView. Theyll need to find entries related to Synology, copy the CLSIDs, and then use a command to block them.
The instructions will be concise: stop Synology Drive processes, remove SyncRootManager entries, and clear file attributes to ensure everything is pinned correctly. Restarting Explorer and Synology Drive will help verify that sync still functions properly. Ill craft commands for querying keys and emphasize backing up the registry for safety! Let's keep it focused and straightforward for the user.</details></think>
---
Ill give you concise, safe commands to re-apply the fixes and strip Windows cloud “SyncRoot” so Explorer stops overriding thumbnails.
### 0) Close Explorer and Synology Drive
Run in an elevated PowerShell:
```powershell
taskkill /IM explorer.exe /F
taskkill /IM SynologyDriveClient.exe /F 2>$null
```
### 1) Remove overlay icon handlers (again)
```powershell
# Backup
reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers" "$env:TEMP\overlay_backup.reg" /y
# Remove OneDrive + AccExtIco overlays (re-applies your earlier change)
'OneDrive1','OneDrive2','OneDrive3','OneDrive4','OneDrive5','OneDrive6','OneDrive7','OneDrive8','OneDrive9',
'AccExtIco1','AccExtIco2','AccExtIco3','AccExtIco4','AccExtIco5','AccExtIco6','AccExtIco7','AccExtIco8','AccExtIco9' |
% { reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\$_" /f 2>$null }
```
### 2) Completely remove any cloud SyncRoot entries for Synology (kills OnDemand behavior)
```powershell
# Backups
reg export "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" "$env:TEMP\SyncRoot_HKLM.reg" /y
reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" "$env:TEMP\SyncRoot_HKCU.reg" /y
# Remove Synology Drive sync-roots (both machine- and user-scope)
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" -Recurse |
Where-Object {$_.Name -match 'Synology|Drive'} | ForEach-Object { Remove-Item -Path $_.PsPath -Recurse -Force }
Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" -Recurse |
Where-Object {$_.Name -match 'Synology|Drive'} | ForEach-Object { Remove-Item -Path $_.PsPath -Recurse -Force }
```
### 3) Ensure OneDrive FilesOnDemand is off (wont harm if you dont use it)
```powershell
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Force | Out-Null
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Name "UseOneDriveFilesOnDemand" -Type DWord -Value 0
```
### 4) Clear Explorer caches (icons + thumbnails)
```powershell
# Icon cache
Remove-Item "$env:LOCALAPPDATA\IconCache.db" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache_*" -Force -ErrorAction SilentlyContinue
# Thumbnail cache
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -ErrorAction SilentlyContinue
```
### 5) Relaunch Explorer and Synology Drive
```powershell
Start-Process explorer.exe
Start-Process "$env:ProgramFiles\Synology\Drive\SynologyDriveClient.exe" -ErrorAction SilentlyContinue
```
### 6) Verify the folder is no longer a SyncRoot
```powershell
Get-ChildItem "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" -Recurse | ? { $_.Name -match 'Synology|Drive' }
Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\SyncRootManager" -Recurse | ? { $_.Name -match 'Synology|Drive' }
```
Expected: no output. If entries reappear immediately, the Drive client is re-registering them; re-open its settings and ensure OnDemand is off, then repeat Step 2.
Optional (OneDrive only): if files still show cloud attributes, in that path run:
```powershell
attrib +P -U /S /D
```
If you want, we can also block Synologys cloud shell extension by CLSID to hard-disable its CFAPI hooks; Ill need the CLSID from ShellExView to add it under:
`HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked`.
Summary:
- Removed overlay handlers again, deleted SyncRoot registrations for Synology so Explorer stops treating the folder as “cloud,” cleared caches, and restarted Explorer. This returns thumbnailing control to Windows/Icaros instead of the cloud provider.
---
_**User (2025-09-28 20:23Z)**_
how to reset windows icon cache?
---
_**Assistant (default)**_
Resetting the Windows icon cache:
## **Method 1: PowerShell (Recommended)**
```powershell
# Stop Explorer
taskkill /IM explorer.exe /F
# Clear icon cache files
Remove-Item "$env:LOCALAPPDATA\IconCache.db" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache_*.db" -Force -ErrorAction SilentlyContinue
# Clear thumbnail cache
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -ErrorAction SilentlyContinue
# Restart Explorer
Start-Process explorer.exe
```
## **Method 2: Manual File Deletion**
1. **Close all Explorer windows**
2. **Open Task Manager** (Ctrl+Shift+Esc)
3. **End "Windows Explorer" process**
4. **Delete these files:**
- `%LOCALAPPDATA%\IconCache.db`
- `%LOCALAPPDATA%\Microsoft\Windows\Explorer\iconcache_*.db`
- `%LOCALAPPDATA%\Microsoft\Windows\Explorer\thumbcache_*.db`
5. **Restart Explorer** from Task Manager → File → Run new task → `explorer.exe`
## **Method 3: Registry Reset (Advanced)**
```powershell
# Reset icon cache registry entries
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache" /f
reg delete "HKCU\Software\Microsoft\Windows\Shell\Bags" /f
reg delete "HKCU\Software\Microsoft\Windows\Shell\BagMRU" /f
```
## **Method 4: Full System Icon Cache Reset**
```powershell
# Stop Explorer
taskkill /IM explorer.exe /F
# Clear all icon-related caches
Remove-Item "$env:LOCALAPPDATA\IconCache.db" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache_*.db" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\*.db" -Force -ErrorAction SilentlyContinue
# Clear system icon cache
Remove-Item "C:\Windows\System32\imageres.dll" -Force -ErrorAction SilentlyContinue
Remove-Item "C:\Windows\System32\shell32.dll" -Force -ErrorAction SilentlyContinue
# Restart Explorer
Start-Process explorer.exe
```
**Note:** Method 4 is aggressive and may require a reboot if system files are in use.
## **Quick One-Liner**
```powershell
taskkill /IM explorer.exe /F; Remove-Item "$env:LOCALAPPDATA\IconCache.db", "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache_*.db", "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\thumbcache_*.db" -Force -ErrorAction SilentlyContinue; Start-Process explorer.exe
```
Method 1 is usually sufficient.
---
_**User (2025-09-28 20:23Z)**_
this is just infinitely loading. wtf do I do
---
_**Assistant (default)**_
If the WebP Image Extension page is stuck loading, try these steps:
## **Quick Fixes:**
### **1. Close and Reopen**
- Close the Microsoft Store
- Reopen it and try again
### **2. Reset Microsoft Store Cache**
```powershell
# Run as Administrator
wsreset.exe
```
### **3. Clear Microsoft Store Cache**
```powershell
# Stop Microsoft Store processes
taskkill /IM Microsoft.WindowsStore.exe /F
taskkill /IM WinStore.App.exe /F
# Clear cache
Remove-Item "$env:LOCALAPPDATA\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\LocalCache\*" -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item "$env:LOCALAPPDATA\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe\TempState\*" -Recurse -Force -ErrorAction SilentlyContinue
# Restart Microsoft Store
Start-Process ms-windows-store:
```
### **4. Alternative Installation Methods**
**Method A: PowerShell**
```powershell
# Install WebP extension via PowerShell
Add-AppxPackage -Path "https://aka.ms/webp-image-extension"
```
**Method B: Direct Download**
- Go to: https://www.microsoft.com/en-us/p/webp-image-extension/9pg2dk419drg
- Click "Get" or "Install"
**Method C: Winget**
```powershell
winget install Microsoft.WebPImageExtension
```
### **5. If All Else Fails**
```powershell
# Reset Microsoft Store completely
Get-AppxPackage Microsoft.WindowsStore | Reset-AppxPackage
```
### **6. Check Network/Firewall**
- Temporarily disable antivirus/firewall
- Try a different network connection
- Check if corporate network blocks Microsoft Store
**Start with Method 1 or 2** — they usually resolve the loading issue.
---