Forum Discussion

JulianCastro's avatar
JulianCastro
Copper Contributor
Feb 14, 2025

A way to get rid of Desktop.ini from Desktop folder in win11.

Hi folks,

Apparently, a fix exists that makes the windows registry take the data of that file in charge
but infos on the net claim it doesn't work anymore on win10., so i've assumed it wouldn"t
in win11 either:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"UseDesktopIniCache"=dword:00000000

& if i just delete the file, it returns at a random instant .. .

& this powershell with admin rights command made it return too:

$TargetDirectory = "C:\Users\Public\Desktop"
(Get-Item "$($TargetDirectory)\desktop.ini" -Force).Attributes = 'Hidden, System, Archive'

the same happened with:
attrib -s -h -r / s / d

So what's the way to definitely make it not return while allowing all other system based files
to show up in all other folders besides my desktop ?.. .

2 Replies

  • Gaup's avatar
    Gaup
    Bronze Contributor

    This prevents the file from being created in the first place:

    1. Press Win + R, type gpedit.msc and press Enter
    2. Navigate to: User Configuration → Administrative Templates → Windows Components → File Explorer
    3. Find and double-click "Turn off the display of hidden system files in Windows Explorer"
    4. Set it to Enabled and click OK
    5. Open Command Prompt as admin and run: gpupdate /force.
    • MarkoRamius's avatar
      MarkoRamius
      Copper Contributor

      That definitely doesn't prevent the files from being created. It just hides them in Windows Explorer. That's all.