title: Unlock Windows workstation programmatically
body: <p>I would like to write a small application that unlocks the workstation. To put the specs of what I need very simple: Have an exe that runs and at a defined time (let's say midnight) unlocks the workstation.
  Of course the application knows the user and password of the logged on account.</p>
  
  <p>I know of the LogonUser API and have tried using it but failed.
  Does anyone have a solution, code excerpt that actually works for this issue?</p>
  
  <p>I am targeting NT5 OSes.</p>
  
  <hr>
  
  <p>Well, since people started asking what is the reason: I am working on a desktop sharing application and I want to add the feature of unlocking the workstation. Having the very small and simple app to unlock the station at a defined time is in order to separate the problem and to avoid the integration details.</p>