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?
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:
cmd
, then press enter)ping example.com
into the command prompt and press Enter to run itL
key (this is the keyboard shortcut to lock the screen in Windows 10)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
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP