Desktop.ini file automatically opens when you start Windows

When you start your computer, the desktop.ini file may automatically open in Notepad. It may have the following contents:

[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21787

desktop.ini opens at login

Desktop.ini is a configuration file which can be used to customize folder icons, caption, etc., on a per-folder basis.

The desktop.ini file (in your the Startup folder)  may open at startup if the hidden and system attributes for the file are missing.

Resolution

To prevent desktop.ini from opening at startup, follow these steps:



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"

That’s it!


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 Comment