Here is what to do if Notepad automatically opens Desktop.ini files on startup. A system failure may cause very strange issues. Although they do not interfere with the performance of Windows, they cause a lot of inconvenience to users. Here is one example of such a “mistake”. Every time you start Windows to the desktop, Notepad automatically opens one or two files with the contents that you can see in the screenshot below.
The first thing that comes to your mind is a new startup entry. Some app could it, or some user. But if you check the contents of startup in task manager, it does not reveal any problems. This is as it should be, because the reason for such a strange behavior of the operating system is different.
This can happen if the “Hidden” attribute is removed from the desktop.ini files due to a failure or some bug in the operation of Windows or Explorer.
What are the mentioned desktop.ini files
Desktop.ini is a system file that stores local folder settings. It may include a custom icon, some localization option, browsing settings, and other details that File Explorer uses to display the files.
There can be one configuration file, but most often there are two of them: one belongs to your account and is physically located in the Startup folder (shell:Startup). The other you will find at in the
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\ folder. It is shared between your and all other accounts in Windows, because that’s a common startup folder.
When you remove the “Hidden” attribute, Windows 10 will no longer treat these files as system files. The OS immediately automatically searches for the most suitable application to open them. For configuration files in INI format, it is Notepad.
So, to fix the issue, you need to restore the hidden attibute.
Fix Notepad opens Destkop.ini files automatically on startup
- Open a new command prompt as administrator.
- Run the following command:
attrib +s +h "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini".
- Next, run the following command:
attrib +s +h "%programdata%\Microsoft\Windows\Start Menu\Programs\Startup\desktop.ini".
- Just restart your computer and see if the problem goes away. It shouldn’t bother you anymore.