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.

6 responses to “FIX: Notepad opens Desktop.ini when you start your computer”

  1. Vanessa St Avatar
    Vanessa St

    Hi I tried to do this – however I just got dozens of ‘access denied’

  2. Randall Agas Luciano Avatar
    Randall Agas Luciano

    it works. thanks a lot!

  3. Ha Tran Avatar
    Ha Tran

    It works! Thanks a lot. You are great!

    1. Ramesh Kumar Avatar
      Ramesh Kumar

      Thanks :)

  4. Kevin Tran Avatar
    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.

  5. Henri Niron Avatar
    Henri Niron

    is work, thanks..

Leave a Reply

Your email address will not be published. Required fields are marked *