sodcalculator

10 Tech How-To

Notepad Opens desktop.ini on Startup? Fix It

Guide 10-47652 · Updated · Step by step

If Notepad opens a desktop.ini file every time Windows starts, the cause is a stray shortcut, a startup entry, or a corrupted file association. The fix is to remove that startup entry or repair the association, and this article walks you through the exact steps to stop it for good.

Why Does desktop.ini Keep Opening?

desktop.ini is a hidden system file that Windows uses to store folder display settings, like custom icons or localized names. It is not meant to be opened by users. When it appears in Notepad at startup, one of three things is happening:

  • A startup program is explicitly launching Notepad with that file as an argument.
  • A scheduled task (often created by a misbehaving app) runs at logon and opens it.
  • The file association for .ini files has been changed to Notepad, and some system process is trying to open it automatically.

The most common culprit is a startup entry that was added by a program you installed, or by a leftover from a previous uninstall. Less often, a malware or adware infection can create such an entry.

Step 1: Disable Startup Entries in Task Manager

The quickest way to stop the file from opening is to check what runs at startup. Press Ctrl+Shift+Esc to open Task Manager, then click the Startup tab. Look for any entry that mentions Notepad, desktop.ini, or an unknown program. If you find one, right-click it and select Disable. Restart your PC and see if the problem is gone.

If you don’t see an obvious entry, the startup item might be hidden in the registry. Open Registry Editor (type regedit in the Start menu) and navigate to:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Also check the same path under HKEY_LOCAL_MACHINE. Look for any value that points to Notepad or a .ini file. If you find one, right-click the value and delete it. Be careful: only delete entries you are sure are related to the problem.

Step 2: Check Scheduled Tasks

Some programs create scheduled tasks that run at logon. To see if a task is opening the file, open Task Scheduler by typing taskschd.msc in the Run dialog (Win+R). Click Task Scheduler Library on the left, then look through the list for any task that triggers at logon and has an action that opens Notepad or a .ini file. If you find one, right-click and disable or delete it.

If you are unsure which task it is, you can temporarily disable all tasks that run at logon and restart. If the problem stops, re-enable them one by one to find the culprit.

Step 3: Repair File Associations

If the file association for .ini files is set to Notepad (which is the default), that alone won’t cause startup opening. However, if a program changed the association to something else—like a script or another editor—Windows might try to open it during startup. To reset the association, go to Settings > Apps > Default apps, scroll down to Choose default apps by file type, find .ini, and select Notepad (or any other editor you prefer).

If the problem persists, you can also reset the .ini association via the command prompt. Open Command Prompt as administrator and run:

assoc .ini=txtfile

This restores the default association. Then check if the issue is resolved.

Why Does This Happen After an Update?

Sometimes Windows updates or third-party software updates can create a startup entry that opens desktop.ini. This is often a side effect of a program that tries to “repair” its own installation but accidentally adds a wrong shortcut. If the problem started after a specific update, you can use System Restore to roll back to a point before the update. Type rstrui in the Run dialog to open System Restore, choose a restore point, and follow the prompts.

Note that System Restore won’t remove personal files, but it may uninstall recently installed programs. It’s a safe troubleshooting step if the above methods fail.

What If It’s Malware?

In rare cases, a malicious program might add a startup entry that opens desktop.ini as a way to run a script or hide its activity. If you’ve checked Task Manager, the registry, and scheduled tasks and found nothing, run a full antivirus scan with Windows Defender (or your preferred security software). Also run a scan with Malwarebytes Adwcleaner (free) to catch adware that often creates such entries.

If you still can’t find the cause, you can use the free tool Autoruns from Microsoft Sysinternals. It shows every startup item, including scheduled tasks and services, and lets you disable them individually. Download it from the official Microsoft website, run it, and look for any entry that references Notepad or a .ini file.

How to Prevent It From Happening Again

To avoid this issue in the future, be cautious when installing free software—many installers try to add extra startup entries. Always choose “Custom” installation and uncheck any optional offers. Also, keep your system and drivers updated, as some updates fix bugs that cause such behavior.

If you frequently need to open desktop.ini files for customization, consider using a text editor that doesn’t associate with the file type by default, or create a shortcut that opens the file only when you double-click it—not at startup.

Frequently Asked Questions

Why does desktop.ini open in Notepad when I start my PC?

It’s almost always because a startup entry (in Task Manager, the registry, or a scheduled task) is telling Windows to open that file with Notepad. Remove the entry and the problem stops.

Is desktop.ini a virus?

No, desktop.ini is a legitimate system file. It’s hidden by default and stores folder view settings. However, malware can hide in startup entries that reference it, so it’s worth scanning if you can’t find the cause.

How do I see hidden files like desktop.ini?

In File Explorer, go to the View tab and check “Hidden items.” To see system files, you also need to uncheck “Hide protected operating system files” in Folder Options (under the View tab in the folder options dialog).

Can I delete desktop.ini files?

You can delete them, but Windows will recreate them as needed. They store folder customization settings, so deleting one may reset a folder’s icon or name. It’s safe to leave them alone.

What if the fix doesn’t work?

If you’ve tried all the steps and the file still opens, use System Restore to a point before the issue started, or run a full malware scan. If you’re comfortable, use Autoruns to inspect every startup item and disable anything suspicious.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →