Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7377
  • Last Modified:

blocking alt+ctrl+del

hi
  any one know that how can i block alt+ctrl+del
using vc++(API).and how can i get adminstrator access in kernal mode using windows
0
arehman_
Asked:
arehman_
  • 3
  • 2
  • 2
  • +6
1 Solution
 
fantasy1001Commented:
There is NO WAY to block alt+ctrl+del!

Thanks,
~ fantasy ~
0
 
bhagyeshtCommented:
make window indentify your program as a screensaver.
http://www.experts-exchange.com/Hardware/Q_10231761.html
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
OHDev2004Commented:
There is a way of blocking access to the Task Manager ;
it's by using the windows registry ,, so u can access the windows registry within your app
and add this item as following :

you should check for this Key :
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
if any of the above Keys don't exists , just create it ,
(because by default the last key "System" does not exists)

then add an Dword Item with the following name "DisableTaskMgr"
with a value of "1"      '(dword:00000001)
0
 
OHDev2004Commented:
by the way ,,, in case u don't know the way to access the windows registry ,,:


(1) from windows : click Start ,, Run ,, then type REGEDIT.exe
(2) from within ur Program : you must call Api Functions to access and write to the registry ,,
     i know these functions but for Vb not in vc++ ,, but u'll find it every where

0
 
Peter SkovCommented:
A quick Googlesearch for
Disable "ctrl-alt-del"

gave me 15900 hits. On the first page, though, this link occurs:
http://forums.free2code.net/view.php?tid=579

It seems there are ways to do it after all.

Peter
0
 
rabi9634Commented:
I'll assume you want to block a specific function.  If you explore the registry a bit more, you can add or disable specific functions in the Task Manager.. (or in the little Windows Security box that comes up in W2K).  
0
 
R_RajeshCommented:
to block specific function click start->run type gpedit.msc you will find local coumputer policy here goto userconfiguration->administrativetemplates->system->ctrl+alt+del option you can disable various features by setting values on the right hand pane. browse through other sections aswell you may find something usefil

this ofcourse does not work on win98, in 98 as  bhagyesht mentioned you can set screensaver running to true.

also check this out
http://www.codeproject.com/useritems/preventclose.asp
0
 
vinnyd79Commented:
The only way to disable ctrl-alt del on an NT based OS is to write a replacement msgina.dll which cannot be done in VB.
0
 
vinnyd79Commented:
uh,sorry. I was thinking this was a vb question.
0
 
vinnyd79Commented:
0
 
bhagyeshtCommented:
vinny: not vb but vc ("using vc++(API).")
0
 
cybermoonlightCommented:
Vinny is correct in saying that to disable ctrl-alt-del on windowsNT based OS's, you must write a replacement GINA dll stub. This must be done   in c as vb cannot create standard dll's. But it is a simple concept, all you have to code is a simple extansion, whose function is to prevent the SAS sequence being passed on to the winlogon process, that hooks into the existing GINA in order to process other events. To get the OS to call this dll you must change the filepath in the registry
check thislink forloadsofinfo on replacingtheGINA
http://www.microsoft.com/windows2000/docs/msgina.doc

this is an example i found while searching through google ..search phrase : GINA Winlogon CTRL-ALT-DEL

-------------------------------- mygina.c --------------------------------
#include <windows.h>
#include <winwlx.h>

struct {
      HMODULE hDll;
      BOOL (WINAPI *WlxNegotiate)();
      BOOL (WINAPI *WlxInitialize)();
      VOID (WINAPI *WlxDisplaySASNotice)();
      int (WINAPI *WlxLoggedOutSAS)();
      BOOL (WINAPI *WlxActivateUserShell)();
      int (WINAPI *WlxLoggedOnSAS)();
      VOID (WINAPI *WlxDisplayLockedNotice)();
      int (WINAPI *WlxWkstaLockedSAS)();
      BOOL (WINAPI *WlxIsLockOk)();
      BOOL (WINAPI *WlxIsLogoffOk)();
      VOID (WINAPI *WlxLogoff)();
      VOID (WINAPI *WlxShutdown)();
      BOOL (WINAPI *WlxScreenSaverNotify)();
      BOOL (WINAPI *WlxStartApplication)();
      BOOL (WINAPI *WlxNetworkProviderLoad)();
} MsGina;

BOOL WINAPI WlxNegotiate(DWORD dwWinlogonVersion, PDWORD pdwDllVersion)
{
      MsGina.hDll = LoadLibrary("msgina.dll");
      if(MsGina.hDll == NULL) return FALSE;

      MsGina.WlxActivateUserShell = GetProcAddress(MsGina.hDll, "WlxActivateUserShell");
      MsGina.WlxDisplayLockedNotice = GetProcAddress(MsGina.hDll, "WlxDisplayLockedNotice");
      MsGina.WlxDisplaySASNotice = GetProcAddress(MsGina.hDll, "WlxDisplaySASNotice");
      MsGina.WlxInitialize = GetProcAddress(MsGina.hDll, "WlxInitialize");
      MsGina.WlxIsLockOk = GetProcAddress(MsGina.hDll, "WlxIsLockOk");
      MsGina.WlxIsLogoffOk = GetProcAddress(MsGina.hDll, "WlxIsLogoffOk");
      MsGina.WlxLoggedOnSAS = GetProcAddress(MsGina.hDll, "WlxLoggedOnSAS");
      MsGina.WlxLoggedOutSAS = GetProcAddress(MsGina.hDll, "WlxLoggedOutSAS");
      MsGina.WlxLogoff = GetProcAddress(MsGina.hDll, "WlxLogoff");
      MsGina.WlxNegotiate = GetProcAddress(MsGina.hDll, "WlxNegotiate");
      MsGina.WlxScreenSaverNotify = GetProcAddress(MsGina.hDll, "WlxScreenSaverNotify");
      MsGina.WlxShutdown = GetProcAddress(MsGina.hDll, "WlxShutdown");
      MsGina.WlxStartApplication = GetProcAddress(MsGina.hDll, "WlxStartApplication");
      MsGina.WlxWkstaLockedSAS = GetProcAddress(MsGina.hDll, "WlxWkstaLockedSAS");

      return MsGina.WlxNegotiate(dwWinlogonVersion, pdwDllVersion);
}

BOOL WINAPI WlxInitialize(
      LPWSTR lpWinsta,
      HANDLE hWlx,
      PVOID pvReserved,
      PVOID pWinlogonFunctions,
      PVOID *pWlxContext)
{
      return MsGina.WlxInitialize(
            lpWinsta,
            hWlx,
            pvReserved,
            pWinlogonFunctions,
            pWlxContext);
}

VOID WINAPI WlxDisplaySASNotice(PVOID pWlxContext)
{
      MsGina.WlxDisplaySASNotice(pWlxContext);
}

int WINAPI WlxLoggedOutSAS(
      PVOID pWlxContext,
      DWORD dwSasType,
      PLUID pAuthenticationId,
      PSID pLogonSid,
      PDWORD pdwOptions,
      PHANDLE phToken,
      PWLX_MPR_NOTIFY_INFO pNprNotifyInfo,
      PVOID *pProfile)
{
      return MsGina.WlxLoggedOutSAS(
            pWlxContext,
            dwSasType,
            pAuthenticationId,
            pLogonSid,
            pdwOptions,
            phToken,
            pNprNotifyInfo,
            pProfile);
}

BOOL WINAPI WlxActivateUserShell(
      PVOID pWlxContext,
      PWSTR pszDesktopName,
      PWSTR pszMprLogonScript,
      PVOID pEnvironment)
{
      return MsGina.WlxActivateUserShell(
            pWlxContext,
            pszDesktopName,
            pszMprLogonScript,
            pEnvironment);
}

int WINAPI WlxLoggedOnSAS(PVOID pWlxContext, DWORD dwSasType, PVOID pReserved)
{
      HANDLE hMutex;

      if(dwSasType == WLX_SAS_TYPE_CTRL_ALT_DEL) {
            hMutex = OpenMutex(MUTANT_QUERY_STATE, FALSE, "mygina mutex");
            if(hMutex != NULL) {
                  CloseHandle(hMutex);
                  return WLX_SAS_ACTION_NONE;
            }
      }

      return MsGina.WlxLoggedOnSAS(pWlxContext, dwSasType, pReserved);
}

VOID WINAPI WlxDisplayLockedNotice(PVOID pWlxContext)
{
      MsGina.WlxDisplayLockedNotice(pWlxContext);
}

int WINAPI WlxWkstaLockedSAS(PVOID pWlxContext, DWORD dwSasType)
{
      return MsGina.WlxWkstaLockedSAS(pWlxContext, dwSasType);
}

BOOL WINAPI WlxIsLockOk(PVOID pWlxContext)
{
      return MsGina.WlxIsLockOk(pWlxContext);
}

BOOL WINAPI WlxIsLogoffOk(PVOID pWlxContext)
{
      return MsGina.WlxIsLogoffOk(pWlxContext);
}

VOID WINAPI WlxLogoff(PVOID pWlxContext)
{
      MsGina.WlxLogoff(pWlxContext);
}

VOID WINAPI WlxShutdown(PVOID pWlxContext, DWORD ShutdownType)
{
      MsGina.WlxShutdown(pWlxContext, ShutdownType);
}

BOOL WINAPI WlxScreenSaverNotify(PVOID pWlxContext, BOOL *pSecure)
{
      return MsGina.WlxScreenSaverNotify(pWlxContext, pSecure);
}

BOOL WINAPI WlxStartApplication(
      PVOID pWlxContext,
      PWSTR pszDesktopName,
      PVOID pEnvironment,
      PWSTR pszCmdLine)
{
      return MsGina.WlxStartApplication(pWlxContext, pszDesktopName, pEnvironment, pszCmdLine);
}

BOOL WINAPI WlxNetworkProviderLoad(PVOID pWlxContext, PWLX_MPR_NOTIFY_INFO pNprNotifyInfo)
{
      return MsGina.WlxNetworkProviderLoad(pWlxContext, pNprNotifyInfo);
}

-------------------------------- mygina.def --------------------------------
EXPORTS
      WlxActivateUserShell
      WlxDisplayLockedNotice
      WlxDisplaySASNotice
      WlxInitialize
      WlxIsLockOk
      WlxIsLogoffOk
      WlxLoggedOnSAS
      WlxLoggedOutSAS
      WlxLogoff
      WlxNegotiate
      WlxScreenSaverNotify
      WlxShutdown
      WlxStartApplication
      WlxWkstaLockedSAS

This should give you all the info you need in order to solve your problem. Thanks

Mark
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
  • 2
  • +6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now