Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6189959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:30:11+00:00 2026-05-24T02:30:11+00:00

I have a kiosk app and have to disable task manager always to prevent

  • 0

I have a kiosk app and have to disable task manager always to prevent closing the program by users .

But some users need the TaskManager to close hanging programs.

Any help would be appropriated.

However, I am sure there is a function in windows to prevent closing a program’s process , as when one attempt to kill rundll.exe process. I want to know that function if I can call it with DllImport

Can anyone help with a trick?

A hack?

A function?

Any other solution?

EDIT:

At least if there is not a way to prevent the process from being closed, I need a way to hide it from processes list appeared in the task manager.

EDIT 2:
I can’t find the solution so far

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:30:11+00:00Added an answer on May 24, 2026 at 2:30 am

    One approach, if you could access the process ID in an administrative context, is to deny the PROCESS_TERMINATE permission on the process to end users. Terminating the process (through task manager or other contexts) is by default granted to the owner, but can be explicitly denied. When it is denied, terminating the process would require the owner to manually change the ACL, and then terminate the process. If the user is neither an administrator nor the owner of the process, he will not be able to forcibly terminate the process (e.g., through Task Manager), although the process will be allowed to exit normally.

    The following code puts an explicit deny ACE on the process with the PID processid for members of the Everyone group.

    #include "Aclapi.h"
    #include "Sddl.h"
    DWORD RestrictTerminateOnProcessId(DWORD processid)
    {
        PACL dacl = NULL, newdacl = NULL;
        HANDLE ph = NULL;
        PSECURITY_DESCRIPTOR* desc = NULL;
        PSID everyonesid = NULL;
        ph = OpenProcess(WRITE_DAC | READ_CONTROL, false, processid);
        if (!ph) goto cleanup;
    
        if (ERROR_SUCCESS != GetSecurityInfo(ph,
                SE_KERNEL_OBJECT,
                DACL_SECURITY_INFORMATION,
                NULL,
                NULL,
                &dacl,
                NULL,
                desc)) goto cleanup;
    
        SID_IDENTIFIER_AUTHORITY WorldAuth = SECURITY_WORLD_SID_AUTHORITY;
        if (!AllocateAndInitializeSid(
                &WorldAuth,1,SECURITY_WORLD_RID,
                0,0,0,0,0,0,0,&everyonesid)) goto cleanup;
    
        // begin copy dacl
        _ACL_SIZE_INFORMATION si;
        GetAclInformation(dacl,
                &si,
                sizeof(si),
                AclSizeInformation);
    
        DWORD dwNewAclSize = si.AclBytesInUse +
                (2*sizeof(ACCESS_DENIED_ACE)) + (2*GetLengthSid(everyonesid)) -
                (2*sizeof(DWORD));
    
        newdacl = (PACL)HeapAlloc(
                GetProcessHeap(),
                HEAP_ZERO_MEMORY,
                dwNewAclSize);
    
        if (newdacl == NULL) goto cleanup;
    
        if (!InitializeAcl(newdacl, dwNewAclSize, ACL_REVISION_DS))
                goto cleanup;
    
        if (!AddAccessDeniedAce(newdacl,
                ACL_REVISION_DS,
                PROCESS_TERMINATE,
                everyonesid)) goto cleanup;
    
        for (int i = 0; i < si.AceCount; i++)
        {
                LPVOID pace = NULL;
                if (!GetAce(dacl, i, &pace)) goto cleanup;
                if (!AddAce(newdacl, ACL_REVISION_DS,
                        MAXDWORD, pace, ((PACE_HEADER)pace)->AceSize))
                        goto cleanup;
        }
    
        // end copy dacl
    
        if (!SetSecurityInfo(ph,
                SE_KERNEL_OBJECT,
                DACL_SECURITY_INFORMATION,
                NULL,
                NULL,
                newdacl,
                NULL)) goto cleanup;
         SetLastError(0);
    
    cleanup:
        DWORD ret = GetLastError();
        if (desc) LocalFree(desc);
        if (newdacl) HeapFree(GetProcessHeap(), 0, (LPVOID)newdacl);
        if (ph) CloseHandle(ph);
        if (everyonesid) FreeSid(everyonesid);
        return !ret;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WPF application that is a fullscreen kiosk app. It's actually a
I have a kiosk app and want to run it at startup. The problem
We're building a kiosk app that will have a fairly wide deployment. The app
I have a program on a kiosk with an associated service that updates the
I have been browsing around to find a way to disable closing Firefox 7
Have a client with a kiosk app that loads a major hotel's site in
I have been approached regarding building a touch screen app for a client, but
I have an MVVM kiosk application that I need to restart when it has
I'm working on a kiosk style slideshow app. I have a UIScrollView which shows
My first application I have developed in RoR is for some Kiosk Touchscreen PCs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.