Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 639
Yuval Peled Avatar asked Sep 23 '08 17:09

Yuval Peled


3 Answers

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 [email protected].

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 [email protected] if you are interested in it.

like image 57
CSharper Avatar answered Nov 19 '22 06:11

CSharper


Please use below information, "[email protected]" is deprecated and less likely to get any responses. Below information is sufficient.

Beginning with the public availability of the Windows 7 Operating System and accompanying Software Development Kit (SDK), SAS functionality for Vista applications will only be available through the Windows SDK. The release support through email of the SASLIB package, and the saslib will be discontinued.

Information on how to download the platform SDK can be found on the Microsoft Download Center page for the “Windows SDK for Windows 7 and .Net Framework 3.5 SP1” at the following link: http://www.microsoft.com/downloads/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505&displaylang=en.

After you install this SDK you will find the redistributable sas.dll in the redist directory:

\Program Files\Microsoft SDKs\Windows\v7.0\redist\x86\sas.dll

\Program Files\Microsoft SDKs\Windows\v7.0\redist\amd64\sas.dll

\Program Files\Microsoft SDKs\Windows\v7.0\redist\ia64\sas.dll

like image 44
Suhas Manangi Avatar answered Nov 19 '22 06:11

Suhas Manangi


I had bookmarked this URL, hope it help. http://softltd.wordpress.com/simulate-ctrl-alt-del-in-windows-vista-7-and-server-2008/

like image 1
Fred Merck Avatar answered Nov 19 '22 06:11

Fred Merck