I built a new PC from scratch and installed Windows and the drivers using a brand-new USB drive. The only other computer that used the drive was a friend's PC, which had no known malware issues. My old PC, where I had previously seen random Command Prompt windows appear, was fully formatted and powered off before I started building the new system.
After connecting the new PC to the internet and restarting it for the first time, a Command Prompt window briefly appeared and closed on its own. Other devices in the house were either reset and offline, and only two Android phones have internet access.
Could malware realistically have transferred to the new PC somehow, or is a brief Command Prompt window during the first startup and update process usually caused by Windows, driver installation, or another normal background task?
3 Answers
If the window closed by itself and there are no other symptoms—such as strange processes, browser changes, pop-ups, crashes, or unusual performance—it probably isn’t anything serious. You can still run a full scan with Windows Security for reassurance, but a one-time flash after going online is commonly caused by updates or driver setup.
The next time it happens, note the exact time and check Event Viewer around that timestamp. You may also be able to identify the program or script in startup history or Task Scheduler. The title bar or visible path, if it stays on screen long enough, could also indicate what launched it.
This is most likely Windows Update, driver installation, or a setup task running during the first login. Windows sometimes launches a script through Command Prompt and closes the window immediately when the task finishes. On a freshly installed system, that’s much more likely than malware being transferred between unrelated devices.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures