Some people assume the Desktop.ini file is a virus or malware because it sometimes appears suddenly on their PC. Luckily, this isn’t the case, but if you’re wondering what Windows’ Desktop.ini file is, you’ve come to the right place. 

In this article, we’ll cover what the Desktop.ini file is, how you can use it, and whether it’s safe to delete.

Table of Contents
    What Is the Windows Desktop.ini File and Can I Delete It? image 1

    What Is the Desktop.ini File?

    The Desktop.ini file is a hidden configuration file found in every folder on Microsoft Windows (including Vista and Windows 10/11). Each Desktop.ini file contains the configuration settings for that folder.

    The Desktop.ini file is not visible by default as it’s a protected operating system file. If it’s suddenly appearing on your PC, you or another user have changed your folder settings to display hidden folders.

    Desktop.ini files are created when specific changes are made to a folder, such as giving it a custom icon or specific sharing settings.

    How Can I See the Desktop.ini File?

    Desktop.ini files are hidden and protected, so the average user will never encounter them. To make them visible in your folder:  

    1. Open File Explorer.
    2. Select the View tab. 
    What Is the Windows Desktop.ini File and Can I Delete It? image 2
    1. Select Options
    What Is the Windows Desktop.ini File and Can I Delete It? image 3
    1. Select the View tab. 
    What Is the Windows Desktop.ini File and Can I Delete It? image 4
    1. Scroll down and check Show hidden files, folders, and drives
    2. Scroll down further and uncheck Hide protected operating system files (Recommended). Select Yes to accept the warning message.
    What Is the Windows Desktop.ini File and Can I Delete It? image 5

    The Desktop.ini file should now appear in any folder where you have altered its configuration or layout. 

    Can I Delete the Desktop.ini File?

    Deleting the Desktop.ini file simply reverts a folder to its default settings. So yes, you can delete the Desktop.ini file. However, if you want to keep the changes you’ve made to a folder’s settings, you can simply hide the Desktop.ini file by reversing the steps we showed you in the previous section.

    How to Customize a Folder With the Desktop.ini File

    Customizing a Windows folder with the Desktop.ini file is simple. First, you need to hide the folder and label it as an important system folder so that Windows grants it the required read-only attribute that enables special behavior from the Desktop.ini file.

    To do so:

    1. Open or create the folder you would like to customize.
    2. Open the Start menu, then type Command Prompt and select it.
    What Is the Windows Desktop.ini File and Can I Delete It? image 6
    1. In Command Prompt, type attrib +s “FolderName”. For example: attrib +s “C:\Test\TestFolder” and hit Enter.
    What Is the Windows Desktop.ini File and Can I Delete It? image 7

    Next, you need to create and edit the Desktop.ini file. To do so, you need to create a text file in the folder you would like to customize.

    1. At the top of the folder window, ensure that File name extensions are turned on.
    What Is the Windows Desktop.ini File and Can I Delete It? image 8
    1. Right-click in your folder and select New > Text Document.
    What Is the Windows Desktop.ini File and Can I Delete It? image 9
    1. Name it Desktop.ini and press Enter. A message box will appear asking you to check the file extension. Click Yes.
    What Is the Windows Desktop.ini File and Can I Delete It? image 10
    1. Right-click the file you’ve just created and select Properties. Next to Attributes, tick Hidden and Read-only.
    What Is the Windows Desktop.ini File and Can I Delete It? image 11
    1. Press OK.
    2. Double-click the file to open it in Notepad. Click File > Save As.
    What Is the Windows Desktop.ini File and Can I Delete It? image 12
    1. For certain phrases/formatting to be picked up, the file needs to be saved in Unicode. At the bottom of the window, by Encoding, ensure that UTF-8 is selected.
    What Is the Windows Desktop.ini File and Can I Delete It? image 13

    The Desktop.ini file is now ready to be populated with configuration settings. Here are some of the following settings you can use to customize your folder:

    • [.ShellClassInfo]: This allows you to customize the folder’s view with the following entries.
    • ConfirmFileOp: If this is set to “0”, you will not receive the warning when deleting or moving the folder.
    • NoSharing: Setting this to “1” means that this folder cannot be shared.
    • IconFile: Used to specify a custom folder icon or thumbnail image. To use this entry, you need to specify the path for the icon. The .ico format is preferred, but it will accept .bmp and .dll files too.
    • IconResource: Similar to IconFile, this is used to specify the path for the icon. It appears instead of IconFile when manually selecting the icon from the folder’s properties.
    • IconIndex: To specify a custom icon, this entry also needs to be present. If the folder containing your icon only has one icon, you can set it to 0.
    • InfoTip: This entry adds an informational text string to the folder so that when hovering your cursor over it, a text box will appear.

    For example, here’s a test folder I created with a custom icon and InfoTip:

    What Is the Windows Desktop.ini File and Can I Delete It? image 14

    And here’s the Desktop.ini file used to customize it: 

    What Is the Windows Desktop.ini File and Can I Delete It? image 15

    That’s All, Folks

    Now you know what the Desktop.ini file is and how you can use it to add custom folder options. While it isn’t particularly useful for most users, it’s always good to know that a mysterious hidden folder isn’t malware evading your antivirus.

    Leave a Reply

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