Link to home
Start Free TrialLog in
Avatar of cakirfatih
cakirfatih

asked on

unlock a computer by DOS command

Hello,

I run some codes on an NT machine. At the end of the code I inserted a system command "logoff" so that when the code execution is completed, the computer automatically logs off. However this only works if the computer is unlocked. When the computer is locked, "logoff" command that is embedded in my code does not work. I was wondering if there is any DOS command that I can embed in my code, so that when the code execution ends, first the computer gets unlocked and then I can call "logoff" command. Thanks.

Avatar of bbao
bbao
Flag of Australia image

> when the code execution ends, first the computer gets unlocked and then I can call "logoff" command.

try to disable the screen saver and run your code again with logoff at the end.
Avatar of cakirfatih
cakirfatih

ASKER

this is one solution yes but, for security reasons i need my computer be locked when i am not there.
thanks
you can manually lock your workstation. what i meant was that you need to disable the screen saver for properly calling LOGOFF command.
ASKER CERTIFIED SOLUTION
Avatar of masterbaker
masterbaker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial