HomeHow to remove desktop.ini file from your computer

How to remove desktop.ini file from your computer

The desktop.ini file is a hidden file used to store information about the arrangement of a Windows folder. Essentially, if a folder’s layout or settings are changed, a desktop.ini file is automatically generated to save those changes.

Could it be a virus in some cases? No, this file is not a virus. However, there are some viruses that take advantage of the capabilities of the desktop.ini file. If you are concerned that this file is infected, scan it with an antivirus program.

Some questions you may be asking yourself:

  • Why is it on your desktop?
  • Is it an essential file?
  • Can you get rid of this file?
  • Can you delete it?

Read the full article to learn more about the desktop.ini file and how to delete it.

How to remove the desktop.ini file from your computer

Learn more about Desktop.ini

The desktop.ini file is a file that most Windows users see on the desktop. It is usually a hidden file. You will see the desktop.ini file on the desktop when you change the layout or settings of a file folder. 

Check how Windows displays your files and folders. It is a file that stores information about the arrangement of folders in Windows. You can find this type of file in any folder on your computer. Best of all, chances are you’ll notice the desktop.ini file on your desktop.

If you view the properties of the desktop.ini file, it shows the file type as “Configuration settings (ini)”. You can open the file using Notepad.

Is the desktop.ini file malicious?

No, it is one of the configuration files of your PC or laptop. It is not a virus or a malicious file. Your computer automatically creates the desktop.ini file, so you don’t have to worry about it. However, there are some viruses that can use the desktop.ini file. You can run a virus check on it to see if it is infected or not.

To scan the desktop.ini file for viruses,

  1. Right-click on the d esktop.ini file.
  2. Choose the scan by virus option.
  3. On some computers, the menu displays the scan option as Scan with ESET Internet Security (I use ESET Internet Security. If you are using another antivirus program, Windows replaces the option with the program name).

If the virus scan does not show any threats, your file is completely safe from virus attacks.

Why do you see the desktop.ini file?

Typically, Windows keeps the desktop.ini file hidden along with other system files. If you can see the desktop.ini file, you may have set options to show hidden files and folders. However, you can change the options if you no longer want to see them.

Can you stop the automatic generation of the file?

No, Windows automatically creates the file whenever you make changes to a folder. You cannot disable the automatic creation of the desktop.ini file on your computer. Even if you delete the file, it will reappear when you make changes to a folder. However, there are a few ways to solve this problem. Read on to learn more.

How to hide the desktop.ini file

I don’t recommend deleting a system file (although deleting would not cause errors); you can hide the desktop.ini file from the desktop.

To hide the configuration file,

  1. Open Search.
  2. Type File Explorer Options and open it.
  3. Switch to the View tab.
  4. Choose the Do not show hidden files, folders, or drives option.

You have now hidden the desktop.ini file. Hidden system files, including the desktop.ini file, will not show up now.

You can also hide the desktop.ini file from File Explorer.

  1. Open File Explorer.
  2. From the File Explorer menu, access the View menu.
  3. In the Show / Hide panel, make sure the Hidden Options box is not checked.
  4. If you see a check mark in the above check box, click it to deselect.

You have now configured File Explorer to not show hidden files and consequently, you have hidden the desktop.ini file.

Can you delete the file?

If you don’t want the desktop.ini file to appear on your desktop, you can simply delete it. Deleting the file does not cause any damage to the system. If you’ve changed your folder settings (appearance, display, etc.), you may not see the customizations. 

For example, if you changed the appearance of the folder and then deleted it, its appearance reverts to its previous appearance. However, you can change the settings again. After changing the settings, the desktop.ini file reappears.

To delete the configuration file:

  1. Right-click on the desktop.ini file.
  2. Click Delete.
  3. Right-click on OK when prompted for confirmation.

You can also,

  1. Select the file using the mouse or keyboard.
  2. Press the Delete key from your keyboard.
  3. Press the Enter key if you are prompted for confirmation.

To permanently delete the desktop.ini file:

  1. Select the desktop.ini file.
  2. Press the Shift + Delete keys on your keyboard.

By following the above ways, you can delete the desktop.ini file.

Here’s how you can delete the file using the command prompt:

To delete the file using the command prompt (desktop.ini):

  1. Open the Run command (type “Run” in the search or press Win + R).
  2. Type cmd, then click on OK.
  3. You can type or paste the command given in the window of the command prompt- del / s / ha desktop.ini

Stop automatic file generation

After you have successfully deleted the file, to prevent it from reappearing, follow the given steps.

  1. Open the Run command (type “Run” in the search or press Winkey + R).
  2. Type regedit, and then click on OK.
  3. You can also search the registry editor and open the application.
  4. Expand HKEY_LOCAL_MACHINE from the left panel of the editor.
  5. Now expand SOFTWARE.
  6. Expand Microsoft. Then expand Windows.
  7. Expand CurrentVersion and select Criteria.
  8. Choose Windows Explorer.
  9. Right-click on it and select New < DWORD Value.
  10. Rename the value as DesktopIniCache.
  11. Double click on the value.
  12. Set the value to Zero (0).
  13. Click on OK.
  14. Now exit the Registry Editor application.

The desktop.ini files now cannot recreate themselves.

Desktop.ini virus removal

If your antivirus software diagnoses the desktop.ini file as a virus or threat, you need to delete it. To remove the file,

  1. Start your PC in Safe Mode.
  2. Delete the file (desktop.ini).
  3. Open the ‘ editor of the register and delete the infected entries on the register
  4. Restart your PC or laptop.

We hope this guide was helpful and you were able to remove the desktop.ini file from your computer. However, if you have any doubts, feel free to ask in the comments section.

author image

About Author

Samuel Afolabi is a lazy tech-savvy that loves writing almost all tech-related kinds of stuff. He is the Editor-in-Chief of TechVaz. You can connect with him socially :)

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.