Desktop.ini file automatically opens when you start Windows

When you start your computer, the desktop.ini file may automatically open (in Notepad) showing the following contents:

[.ShellClassInfo]
[email protected]%SystemRoot%\system32\shell32.dll,-21787

This happens if the hidden attribute for the desktop.ini file in the Startup folder is somehow removed. Enable the hidden attribute for desktop.ini in your Startup and Common Startup folders to resolve the issue. To do so, you can use the Command Prompt.



Open an elevated Command Prompt window and run these two commands:

attrib +s +h "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini"
attrib +s +h "%programdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini"

One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

4 thoughts on “Desktop.ini file automatically opens when you start Windows”

  1. After several attempt this does not work. I’m going insane here. geek squad has tried this numerasssss times. Give me a break. someone has to know how to fix this

    Reply
    • This began happening to me when i installed python for the first time, so it may have an affiliation with that.
      There are 2 ways that i know to prevent startup apps like that:
      Task manager in windows 10 has a “Startup” tab. if “desktop.ini” is on that list, right click and select “Disable”.
      If that doesn’t work, Select “Open File Location” in the task manager startup tab, and right click the file go to “properties”, then select “hidden” then apply and exit.
      The second one worked fine for me, i hope i helped you.

  2. It worked for me thanks! here’s what i did:
    open admin Command Prompt, enter first code then second and restart. that’s it, desktop.ini not opening up anymore

    Reply

Leave a Reply to Ken Cancel reply