TransWikia.com

does a CMD window stop running while Windows 10 lock screen is enabled?

Super User Asked on November 3, 2021

I’m not sure how the lock works in Windows 10, but I’d like to access the features of locking my screen after a CMD process has been executed. As the CMD window would already be running before the screen is locked, does this mean it would continue running once the screen is locked?

If not I’d be interested to know how to allow this. There are other articles that describe how to enable background apps using Windows Settings, but there is no mention of how I might accomplish this for custom apps or even a simple CMD window process.

Is it possible to lock Windows 10 while also allowing a CMD window to continue running, or does it simply keep running anyways?

4 Answers

It would continue to run, but may lose scheduling priority as it is no longer the foreground application, and the computer might suspend or hibernate when no user interaction is registered for a time.

Scheduling priority is only an issue if anything else is happening on the machine -- basically if it's the only process running, its priority doesn't matter.

So as long as your power policy will not suspend the machine when you walk away, your process will continue to run.

Answered by Simon Richter on November 3, 2021

ALL programs in the currently logged on session will continue to run when the session is locked.

As a server and database administrator that often has to deal with moving around 100,000+ client uploaded files with RoboCopy, I do this ALL the time. I also frequently leave programs like 7Zip, WinSCP and SQL Server Management Studio running scripts/processes while the session is locked.

The keyword here is Locked, NOT Logged Off. Logging off will close all programs running in the current session.

Answered by Chris Butler on November 3, 2021

By default, command windows continue to run while the screen is locked.

To verify this, try the following:

  • Open a command prompt window (in case you don't know how, press the Windows key, type cmd, then press enter)
  • Type ping example.com into the command prompt and press Enter to run it
  • While the ping is happening, hold the Windows key and then press the L key (this is the keyboard shortcut to lock the screen in Windows 10)
  • Wait a few moments, then unlock your screen

You should see that the ping operation continued while the screen was locked. Voila!

Answered by bobsbeenjamin on November 3, 2021

Most programs running when the computer is locked will continue to run, including command shells, like the command prompt or Powershell. It is possible for the developer of an application to detect a locked computer and perform an action, like pausing or even closing the application. However, that is generally rare, especially for a console application, as they tend to be used for servers, services, and simply outputting information. A contrary example would be a single player game, which are often programmed to detect a computer being locked and then pause the game.

Answered by Keltari on November 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP