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?
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?
PostMessage(HWND_BROADCAST, WM_HOTKEY, 0, MAKELONG(MOD_ALT | MOD_CONTROL, VK_DELETE));
You get PostMessage from the user32 dll
edit: CodeProject article that has code for it
edit: There is some discussion from VNC on why that won't work in Vista and how to set up UAC to allow it.
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:
Please note that this library is not free. Meanwhile you can contact [email protected] if you are interested in it.