How can I get Windows to ignore certain files in the Startup folder?

Simply put, I want to comment out files as one comments out lines of code... Something that works like .gitignore, but for Windows.

My situation:

I am trying to get Windows to ignore some files in the StartUp folder and not execute them during startup. Due to certain reasons, I am reluctant to actually remove these files from the StartUp folder. Nesting these files inside another folder in the StartUp folder doesn't work as then that folder opens up at startup. A workaround I have found is the marked answer here, but this does not work for shortcuts.

If possible, I would prefer a solution which can to used to get other scripts to ignore files too.

  • 1
    Is there a reason you can't simply, move these shortcuts, to another location other than the folder they are currently in? What you describe simply does exist by the way.
    – Ramhound
    Oct 21, 2021 at 14:13
  • That would work as a temporary solution. But I'd rather not do that because I'm surely going to lose track of that location in a year.
    – Off Kilter
    Oct 21, 2021 at 14:18
  • 1
    You can't determine if you want to make the change permanent within a reasonable amount of time? There is nothing special about those shortcuts. In any event there is no way to have Windows "ignore" a shortcut in that folder.
    – Ramhound
    Oct 21, 2021 at 14:20
  • 10
    @OffKilter Perhaps using a folder name like "Startup (Disabled)" will make it easy to find them at a later date. Or use AutoRuns to disable them. Oct 21, 2021 at 14:29
  • 1
    I came here to point out that I use AutoRuns (GUI) for this purpose. I see it's already been mentioned, but I want to emphasize that it's a good solution. Note that it lets you disable (and re-enable) those by clicking.
    – JDługosz
    Oct 22, 2021 at 16:44

4 Answers 4


A simple solution: Right-click the shortcut, select Properties, and in the General tab set the shortcut to Hidden, then click OK.

I have just tested it, and it works - a hidden shortcut is not used when booting.

The folder I did it on was
C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.

To undo, in order to see in Explorer the hidden files, you need in View tab > Options button > View tab to set "Show hidden f‌iles, folders and drives".

  • 7
    Color me surprised. I didn't realize that hiding a file does any more than just hide it from the user... I guess I have to ask now what exactly hiding a file does... Anyway, thank you.
    – Off Kilter
    Oct 21, 2021 at 15:20
  • 4
    @OffKilter Pretty much the same thing as adding a '.' in linux. Well behaved programs should ignore those files but they don't have to. Oct 21, 2021 at 22:20
  • 8
    @IronGremlin actually no, adding a . in Linux changes filename so that the app won't e.g. find the file by name if it were looking for the original name. Hiding a file on Windows is more similar to some kind of an extra chmod bit, just as "readonly" attribute in Windows corresponds to chmod u-w in Linux.
    – Ruslan
    Oct 21, 2021 at 23:22
  • 26
    @SodAlmighty That's debatable. The Linux kernel itself assigns no significance whatsoever to a leading .. By convention, many userspace programs choose not to show them in directory listings.
    – David
    Oct 22, 2021 at 2:22
  • 2
    @David ...and, funny enough, it began as a bug that proved useful, so they kept it. (The code was just meant to hide . and ...)
    – ssokolow
    Oct 23, 2021 at 8:26

Just use the standard startup configuration tools.

This used to be handled by msconfig, which used to have a Startup tab where you could uncheck individual startup items to disable them. This goes way back to Windows XP at least (perhaps even 95 or 98). However, as @Scott pointed out in the comments, running msconfig requires administrator rights.

In Windows 8 and later, this got moved to the Task Manager which got a Startup tab for the same purpose. This move also made it available for non-administrators.

Disabling an item here doesn't alter the link in the Startup folder in any way. It just configures Windows not to run it (via the registry).

  • msconfig can't run without administrator privileges.  A user should be able to control what gets started when they login without having administrator privileges. … … … … … … … … … … … … … To add insult to injury, if you login as plain user "umberto", then run msconfig and authenticate as administrator user "albert", it shows you albert's Startup folder, not umberto's.  So ISTM that this answer doesn't work at all (at least not for older versions of Windows, where `msconfig would be the tool to use). Oct 22, 2021 at 18:54
  • @Scott Windows 7 and before is already long past EOL, so that part of the answer is mostly for historical context. Good point about admin rights, I'll edit that in. Task Manager can be run by anyone, so at least on all supported Windows versions (Win8+, hopefully the vast majority of current systems) the answer works just fine.
    – TooTea
    Oct 22, 2021 at 19:37
  • @TooTea "Task Manager can be run by anyone" It can be disabled through group policies. I can't access it on one of the work computers I use.
    – Yay295
    Oct 24, 2021 at 6:14

I'm adding this answer for historic reasons. This was an "unofficial convention" often followed in the DOS/Windows 3.x days and for some time afterwards (for all sorts of "keeping files" but having them "invisible" - not only the startup menu).

Overall idea: since Windows uses the file extension(1) to determine how a file should be run(2), changing this extension will prevent the file from being "seen" by the application responsible for that file type(3).

(1) = this is the part of the filename after the last . (period). Up until Windows '95 this was limited to 3 characters. The extension is now hidden by default and e.g. File Explorer's settings need to be changed to show it. (Startup files have a .LNK ("link") extension.)

(2) = or more technically: which program/application/executable should take a file of this extension to run with it as input.

(3) = Programs/applications/executables are associated with files of a certain type, as determined from their extension, under Settings: On my Windows 10 system, I open the Start menu (press the Windows key) then type "assoc" and choose "Choose default applications by file type". On the resulting dialog you will see the extension in the left column and the application in the right column. Still works though.


(a) One will need to change settings, or work in the command line window, to see the files' extensions.

(b) This solution involves changing the filenames (and potentially changing them back, once done).


The "convention" was to create a backup file, by replacing the file's extension with .BAK (for the historical 3-character limit). Since longer filenames have been introduced on Windows, it is probably safer to preserve the original extension and simply appending .BAK (which makes it easier to remove later on without guesswork).

Sometimes it is helpful to also add a timestamp, especially when creating multiple versions of the same file, e.g. .BAK-20211022.

Longer file name limits obviously allow one to use longer extensions, e.g. .Backup-31-May-2021, but lazy typists try to stay as short as possible :-). It is nice to stay consistent though. Also remember that the ISO date format of YYYYMMDD sorts nicely with an alphabetical sort, as may be done in File Explorer or with DIR.

  • 1
    @Scott I read it as advising the questioner to rename the shortcut files so they end in .bak, thus keeping Windows from seeing them as shortcuts.
    – ssokolow
    Oct 23, 2021 at 8:20
  • 1
    @Scott That sounded so counter to everything that I know about how Windows determines file type that I fired up my Windows XP retro-machine to do a quick check. ren NetTime.lnk NetTime.lnk.bak does indeed keep Windows from recognizing it as a shortcut... instead popping up an "Open With..." dialog on login. Has a later version of Windows implemented a Linux-style "file type by header inspection" check or used NTFS alternate streams to implement something akin to the file type codes stored in macOS resource forks?
    – ssokolow
    Oct 23, 2021 at 18:13
  • @Scott can you suggest how the sentence after "Overall idea", which is supposed to explain the mechanism, can be made any clearer?
    – frIT
    Oct 24, 2021 at 17:52

When I run NirSoft WhatInStartup, right-click a Startup folder item and select "Disable" it will create, inside the Startup folder, a folder named ~Disabled with the hidden attribute set.

I did not actually reboot my machine to verify this but I can't imagine NirSoft would have implemented it this way if Windows then actually opened that folder on startup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.