Is there a way to lock a Windows XP machine via the command line? The shutdown command doesn't have an option for it.
|
|
|||
|
I've been warned that this isn't recommended (except by Microsoft). The warnings are also centered around the command's close relative, ExitWindowsEx (Which shuts down the computer). I've never had any issues with it, but YMMV.
(Source) |
|||||||||||||||
|
|
On Windows Server 2012 press: Win + L |
|||||
|
|
Since it's not recommended to run LockWorkStation via rundll32.exe, another solution is to use Wizmo. Just run:
|
|||
|
|
|
You can also do this from a local machine to lock a remote workstation by using a UNC path:
Getting access denied with Windows 7 workstations, but works with Windows XP. |
|||||
|
|
Note that in Windows Vista/7, you can use the command If you use the |
|||||
|
|
If you have access to Visual Studio's C++ compiler here's the (extremely complicated) source:
|
|||
|
|

