Why Does a CMD Window Open at Startup in Windows 11?

February 21, 2026 5 answers
Asked by CuriousGadget42
I've been having a frustrating issue where a Command Prompt window pops up each time I log into my Windows 11 system. This window always starts in C:WindowsSystem32, and while it usually closes on its own after a bit, there are times when I need to close it manually. I've gone through the startup apps and disabled everything, but the problem persists. I even checked the Task Scheduler since I heard some Office updates can trigger this behavior, but I'm using an Office LTSC version and couldn't find anything related. Aside from this, my system is functioning well, but it's really annoying to see the CMD window every time I boot up. Has anyone else dealt with this or have any suggestions for fixing it? Thanks!

Answers

ResetMaverick
Instead of digging through scripts, you might want to try resetting your PC. Go to Start, then Settings, navigate to System, pick Recovery, and select Reset PC. Just make sure you're connected to the internet while you do this.
Reply to this answer
GroupPolicyNerd
Itโ€™s possible that this issue could be related to group policy settings as well, which can trigger scripts or commands at login. Might be worth investigating that route too.
Reply to this answer
PatchFinder83
Are you using Patch My PC by any chance? I think that can cause CMD to appear at startup for certain applications it manages.
Reply to this answer
TechSavvyJoe
It sounds like what you're encountering could be related to a login script. I'd suggest checking your scheduled tasks to see if something's been set to run at startup. If it isn't something you set up and you're the only one with admin rights, I'd be a bit suspicious about it. If thereโ€™s another admin, they might have configured it for some reason.

CodexExplorer99: Just to clarify, what exactly is a login script? Is it just a script that runs when you log in?

Reply to this answer
AuditGuru21
One option you may find useful is to enable process auditing for command line creation events. Look into 'Audit Process Creation' and make sure to include command line details in your process creation events. After setting that up, you can reboot, and then check the Security event log for any cmd.exe entries around the time you logged in.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions