File Explorer preview pane shows “The file you are attempting to preview could harm your computer” – FIX
Hello guys,
I’m a freelance IT systems engineer for small and medium-sized companies.
I recently ran into an issue where File Explorer would not display file previews in the Preview Pane, showing the following warning message instead:
“The file you are attempting to preview could harm your computer. If you trust the file and the source you received it from, open it to view its contents.”
Unfortunately, I noticed there’s no clear or correct solution for this anywhere, not even on major tech forums or AI platforms, even though the fix is actually quite simple. You only need to modify a couple of registry entries, depending on whether your files are accessed via domain name or IP address over a network share (UNC/SMB).
🔹 For network shares accessed via domain name (e.g. \\company.local\)
Create a new key named after your domain (e.g. company.local) and set the file DWORD to 1:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\company.local]
"file"=dword:00000001
🔹 For network shares accessed via IP address (e.g. \\192.168.0.10\)
Create a new key (e.g. Range1), set the file DWORD to 1, and define :Range with the IP address:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range1]
"file"=dword:00000001
":Range"="192.168.0.10"
🔹 Optional: prevent Windows from asking for download confirmations
If you don’t want Windows to repeatedly ask for confirmation when opening downloaded files, set this registry value:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments]
"SaveZoneInformation"=dword:00000001
After applying these changes, File Explorer previews will work normally again for network files without the security warning. You don’t need to restart your computer, simply restart the Windows Explorer (explorer.exe) process from Task Manager for the settings to take effect (similar to restarting a service on Linux).