Type the user name (e.g., ramesh) and click OK.Click Change Permissions, which will now change to Add. You can now add Permission entries as required. The Administrators group is now the owner of the file.
If you have just taken ownership of this object, you will need to close and reopen this object’s properties before you can view or change permissions. Simply close the Advanced Permissions dialog and re-open it. Click “Change” to change the ownership of the file.
For more information on takeown.exe and icacls.exe commands, check out the article Take Ownership of a File or Folder Using Command-Line in Windows. where “ramesh” is the username who you want to prevent from accessing cmd.exe. Method 1: Using ICacls.exe Command-line Utilityįrom an elevated or Administrator Command Prompt window, and run these commands: takeown /f cmd.exe This can be done using the built-in console tool icacls.exe or the Advanced Security settings dialog. Locking down the Command Prompt can be done using NTFS Permissions, by adding a Deny Permission entry (to cmd.exe) for a specific user or group. Prevent Command Prompt Access for Specific Users