?
Solved

unlock a computer by DOS command

Posted on 2006-04-22
4
Medium Priority
?
1,494 Views
Last Modified: 2013-12-23
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.

0
Comment
Question by:cakirfatih
  • 2
4 Comments
 
LVL 37

Expert Comment

by:bbao
ID: 16516092
> 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.
0
 

Author Comment

by:cakirfatih
ID: 16516734
this is one solution yes but, for security reasons i need my computer be locked when i am not there.
thanks
0
 
LVL 37

Expert Comment

by:bbao
ID: 16518335
you can manually lock your workstation. what i meant was that you need to disable the screen saver for properly calling LOGOFF command.
0
 
LVL 13

Accepted Solution

by:
masterbaker earned 1000 total points
ID: 16519589
Here you go - straight from Microsoft themselves (a script to do what you need):

http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1115.mspx

Jeff
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question