“desktop” file opens in Notepad on startup

Problem

When you start your computer, a notepad window appears with some text. The name of the file is “desktop”.
It may contain the following text:

“[.ShellClassInfo]

LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21787”

Cause

This is caused by the desktop.ini files (created by Windows) being present in (at least) one of the startup folders. The files should be set with the hidden attribute.

Solution

  1. Open Command Prompt as administrator.
  2. Select all the text in the relevant box below, right click and click Copy:
    • Windows Vista, 7 or newer
      del /f /q "%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini"
      del /f /q "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini"
      del /f /q "%appdata%\Microsoft\Windows\Start Menu\desktop.ini"
      exit
    • Windows XP
      del /f /q "userprofile%\Start Menu\Programs\Startup\desktop.ini"
      del /f /q "%allusersprofile%\Start Menu\Programs\Startup\desktop.ini"
      del /f /q "%allusersprofile%\Start Menu\desktop.ini"
      exit
  3. Right click in the Command Prompt and click Paste.
  4. Press Enter and the Command Prompt should close.

4 comments

  1. bonjour, merci pour la résolution du problème, mais moi c’est sous Windows 8.1. Et cela ne fonctionne pas si vous avez une idée merci d’avance

    Translation: Hello, thank you for solving the problem, but I is Windows 8.1. And it does not work if you have an idea thank you in advance

    1. Bonjour Salvan,
      Êtes-vous capable de trouver ces fichiers:
      “%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini”
      “%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini”
      “%appdata%\Microsoft\Windows\Start Menu\desktop.ini”

      Translation:
      Hello Salvan
      Are you able to find these files:
      “%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini”
      “%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini”
      “%appdata%\Microsoft\Windows\Start Menu\desktop.ini”

Leave a Reply to Tominakasi Cancel reply

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