Windows – Simulate Control-Alt-Delete key sequence in Vista and XP

winapiwindowswindows-vista

Can I simulate in C#/C++ code Control+Alt+Delete sequence in Vista?
When UAC enabled/disabled?
How it is done in XP?

Can you provide a code sample that works in Vista?

Best Answer

Existing code to simulate the Secure Attention Sequence (SAS), which most people refer to as control alt delete or ctrl-alt-del, no longer works in Windows Vista. It seems that Microsoft offers a library that exports a function called SimulateSAS(). It is not public and one is supposed to request it by sending a mail to saslib@microsoft.com.

There is a similar library available with the following features:

  • Works both with and without User Account Control (UAC)
  • Supports current, console and any Terminal Server session
  • Does not need a driver
  • The calling application does not need to be signed or have a special manifest
  • Supports multiple programming languages

Please note that this library is not free. Meanwhile you can contact info@simulatesas.com if you are interested in it.