Exetools  

Go Back   Exetools > General > General Discussion

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2013, 08:15
BoB's Avatar
BoB BoB is offline
Lo*eXeTools*rd
 
Join Date: Jun 2009
Location: England
Posts: 85
Rept. Given: 88
Rept. Rcvd 56 Times in 24 Posts
Thanks Given: 2
Thanks Rcvd at 2 Times in 2 Posts
BoB Reputation: 56
Hi, you can create a new desktop object, which avoids Alt + Tab, Ctrl + Alt + Del ..

Code:
hOldThreadDesktop := GetThreadDesktop(GetCurrentThreadId);
hOldInputDesktop := OpenInputDesktop(0, FALSE, DESKTOP_CREATEWINDOW + DESKTOP_SWITCHDESKTOP);
hLockedDesktop := CreateDesktop('LockedDesktop', nil, nil, 0, DESKTOP_CREATEWINDOW + DESKTOP_SWITCHDESKTOP, nil);
SetThreadDesktop(hLockedDesktop);
SwitchDesktop(hLockedDesktop);
..Then run your application within that new desktop ..

Code:
SI.cb := SizeOf(StartupInfo);
SI.lpDesktop := PChar('LockedDesktop');
If CreateProcess(nil, 'YourApp.exe', nil, nil, True, 0, nil, nil, SI, PI) Then
  WaitForSingleObject(PI.hProcess, INFINITE);
..And when your app exits, return to 'real' desktop ..

Code:
if hOldInputDesktop <> 0 then SwitchDesktop(hOldInputDesktop);
if hOldThreadDesktop <> 0 then SetThreadDesktop(hOldThreadDesktop);
if hLockedDesktop <> 0 then CloseDesktop(hLockedDesktop);

See Desktops @ MSDN

Have fun!
BoB
Reply With Quote
  #2  
Old 09-03-2013, 10:49
ontryit ontryit is offline
Friend
 
Join Date: Nov 2011
Posts: 172
Rept. Given: 127
Rept. Rcvd 17 Times in 14 Posts
Thanks Given: 439
Thanks Rcvd at 70 Times in 43 Posts
ontryit Reputation: 17
Quote:
Originally Posted by BoB View Post
Hi, you can create a new desktop object, which avoids Alt + Tab, Ctrl + Alt + Del ..

Code:
hOldThreadDesktop := GetThreadDesktop(GetCurrentThreadId);
hOldInputDesktop := OpenInputDesktop(0, FALSE, DESKTOP_CREATEWINDOW + DESKTOP_SWITCHDESKTOP);
hLockedDesktop := CreateDesktop('LockedDesktop', nil, nil, 0, DESKTOP_CREATEWINDOW + DESKTOP_SWITCHDESKTOP, nil);
SetThreadDesktop(hLockedDesktop);
SwitchDesktop(hLockedDesktop);
..Then run your application within that new desktop ..

Code:
SI.cb := SizeOf(StartupInfo);
SI.lpDesktop := PChar('LockedDesktop');
If CreateProcess(nil, 'YourApp.exe', nil, nil, True, 0, nil, nil, SI, PI) Then
  WaitForSingleObject(PI.hProcess, INFINITE);
..And when your app exits, return to 'real' desktop ..

Code:
if hOldInputDesktop <> 0 then SwitchDesktop(hOldInputDesktop);
if hOldThreadDesktop <> 0 then SetThreadDesktop(hOldThreadDesktop);
if hLockedDesktop <> 0 then CloseDesktop(hLockedDesktop);

See Desktops @ MSDN

Have fun!
BoB
This solution was recommended by Microsoft but only for XP, you need to add a code to avoid taskmgr from shown on the default desktop when the the ctrl+alt+del/ctrl+shift+esc keys was pressed on xp in order to not make it suspiously looking. on W7 this solution can't be disable ctrl+alt+del keys
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl-Minus in Hiew mer0x36 General Discussion 2 12-12-2024 03:47
How to disable VM detection? te$ter General Discussion 3 05-16-2015 17:06
Origins of Ctrl-Alt-Del Anticode General Discussion 0 04-17-2005 20:16
Why?the kb is disable 3boy General Discussion 1 09-03-2003 20:22


All times are GMT +8. The time now is 01:48.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )