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 file type 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 harmful?
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 the file desktop.ini.
2. Choose the option scan for vVirus.
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 shows no 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 tab Show.
4. Choose the option Don't show hidden files, folders or drives.
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 menu File Explorer, enter the menu Show.
3. In the panel Show / hide, make sure the box Hidden options is not selected.
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:
- Right click on the file desktop.ini.
- click on Remove.
- Do click su OK if confirmation is requested.
You can also,
- Select the file using the mouse or keyboard.
- Press the key Canc from the keyboard.
- Press the button Submit if confirmation is requested.
To permanently delete the desktop.ini file:
- Select the file desktop.ini.
- Press i Shift + Delete keys on the 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):
- Open the command Run (type "Run" in the search or press Win + R).
- To type cmd and do click su OK.
- You can type or paste the given command into the window of command prompt: del/s/ah 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 command Run (type "Run" in the search or press Winkey + R).
2. Type Regedit and do click su OK.
3. You can also search in 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 the value.
12. Set the value to Zero (0).
13. Do click su OKAY.
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. Boot your PC into Safe mode.
2. Delete the file (desktop.ini).
3. Open theeditor of record and delete infected registry entries
4. Restart the your PC or laptop.
We hope this guide has been helpful and you have been able to remove the desktop.ini file from your computer. However, if you have any doubts, feel free to ask in the comments section.
- How to change the desktop background in Windows 11
- How to remove a Google account from Chrome
- How to remove your profile picture from Microsoft Teams on mobile and PC
- How to remotely control your computer (Windows + Mac)
- 4 ways to stop Windows 10 from saving files to OneDrive