A black C:\Windows\System32 command window at sign-in is commonly caused by a startup item or scheduled task launching Command Prompt.
A practical way to isolate it is a clean boot:
- Press
Windows + R, typemsconfig, and press Enter. - In System Configuration, open the Services tab.
- Select Hide all Microsoft services.
- Select Disable all.
- Open the Startup tab and select Open Task Manager.
- Disable each startup item.
- Restart the laptop.
If the pop-up stops after restart, one of the disabled startup items or non-Microsoft services is causing it. Re-enable items in small groups until the black window returns to identify the exact program.
If the pop-up still appears, check for a scheduled task or startup entry that points to an unwanted command:
- Download Autoruns.
- Run
Autoruns64.exeas administrator. - Let the scan finish.
- Review startup entries and scheduled tasks for anything suspicious or anything that launches Command Prompt from an unexpected path.
- Disable or remove the matching entry.
If the issue is tied to a specific file or folder name shown in the window, use Autoruns Quick Filter to search for that name and remove the matching entry.
References:
- Context System 32 keeps showing up every now and again on my pc and takes me out of whatever I was tabbed into - Microsoft Q&A
- Context Command prompt popping up and disappearing immediately Windows 10 - Microsoft Q&A
- Context Microsoft Windows [Version 10.0.22621.4317] (c) Microsoft Corporation. All rights reserved. C:\Users\Admin> - Microsoft Q&A