FIX: Notepad opens Desktop.ini when you start your computer

It happens very frequently after scanning and removing malware from the computer, Notepad opens one or more Desktop.ini files on startup, containing following content:

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

The above code helps to read String ID 21787 (and it is Startup) in shell32.dll file and sets localized resource name of folder.

notepad starts desktop ini

Notepad opens Desktop.ini when you start your computer

There are lots of myth about this issue that Desktop.ini is an unwanted file, can be found at various locations in Windows, and a kind of VIRUS as well. But the truth is that Desktop.ini is a system and hidden file, used to store customize settings for the folder that contain the file. And for sure it is not VIRUS.

Origin:

In Real Time Protection mode, some Antivirus change Desktop.ini attributes and also enable Show hidden files, folders and drives while cleaning malware infection.

Solution:

  1. Run Command Prompt (Console) as Administrator and execute the following to jump to root of System drive.
  2. CD\

  3. Now, execute the command to reset all Desktop.ini attributes.
  4. Attrib +s +h Desktop.ini /S

  5. Restart your computer and verify that the issue is fixed.
About RKonit

He is a technologist, writes code for fun and work out of his home office, and has been Microsoft MVP for 4 years, specializing in Windows and also became Microsoft .Net Rockstar.

  • http://www.facebook.com/tranh309 Ha Tran

    It works! Thanks a lot. You are great!

    • http://www.windowsvalley.com Ramesh Kumar

      Thanks :)

  • Kevin Tran

    Thank you for this post. It solved an issue we had today on Windows 7.

    The console was located using a search for “cmd”. It should be the result that ends with “.exe” and holding “ctrl+shift” while clicking on it launched it with Administrator privileges as per the instructions.

  • Henri Niron

    is work, thanks..