Change ownership of a file or folder using takeown command-line tool

Содержание:

How To Grant Full Access To Your User Account Over The Files And Folders?

After you have completed the above steps, the owner of the file or folder will be changed to your user account. But this doesn’t mean that your account has complete access to the file or folder. To grant full access to your user account, follow the steps given below:

  1. Open the Advanced Security Settings of the folder again.
  2. Under the Permission Entries section, click on the Add option.
  3. Click on the Select a principal option. This will open the Select User or Group dialog.
  4. Select the Advanced option.
  5. Click on the Find Now option and select your account’s username from the search result.
  6. Click on OK and after that click on OK again.
  7. In the Basic Permissions section, check the Full control box.
  8. Make sure the Type is set to Allow and Applies to is set to This folder, subfolders, and files.
  9. Click on OK, then on Apply and OK to save the changes.
  10. Again, click on OK to close the file or folder properties.

Now, you will have full access to the file or folder. By taking ownership, you can get complete control over Windows 10 directories.

Method 1 — Add “Take Ownership” Option in Context Menu via Registry Tweaks

By using this method you actually have to make some changes in the Registry in order to achieve your goal. But since those tweaks are quite a few, it would be a pain in the back to make them all manually so just use the registry files provided below:

All you have to do is download the first registry file (Add ‘Take Ownership’ Option in Context Menu.reg), double-click on it and click Yes in the confirmation message that will pop-up in order to apply all required registry changes. Then you can try right-clicking on a file or folder and see that the “Take Ownership” option has been successfully added to the context menu.

If you want to remove the “Take Ownership” option from the context menu afterwards, just download the second registry file we provide (Remove ‘Take Ownership’ Option from Context Menu.reg), double-click on it and click Yes in the confirmation message that will pop-up in order to revert all registry changes that were made in the first place.

All credit for the registry files goes to Shawn Brink from TenForums.

Notes

1. If you’re using an administrator account, then you’ll just have to click Yes on the confirmation message that appears after using the “Take Ownership” context menu option.

2. If you’re using a standard user account, then you’ll have to enter a selected administrator’s password after using the “Take Ownership” context menu option. Furthermore, in this case the new owner will be the administrator and not the standard user.

3. You might be prompted for permission by UAC whenever you use the “Take Ownership” option (it depends on your UAC settings).

4. The “Take Ownership” option will not be available to the right-click context menu of application files (e.g. EXE, BAT, MSI). Instead, they will keep their “Run as administrator” option.

5. The above registry files work only under English Windows 10 installations.

6. You can use the provided registry files to add the “Take Ownership” option under Windows 10, 8, 8.1, 7 and Vista.

Управление политикой

В этом разделе описаны компоненты, средства и рекомендации, которые помогут в управлении этой политикой.

Перезагрузка устройства не требуется для того, чтобы этот параметр политики был эффективным.

Изменения прав пользователя вступают в силу при его следующем входе в учетную запись.

Право собственности можно получить по:

  • Администратор. По умолчанию группе администраторов предоставляется право на владение файлами или другими объектами.
  • Любой пользователь или любая группа, у которых есть пользователь Take ownership прямо на объекте.
  • Пользователь, который имеет право на восстановление файлов и каталогов.

Право собственности может быть передано следующим образом:

  • Текущий владелец может предоставить право пользователя take ownership другому пользователю, если он является членом группы, определенной в маркере доступа текущего владельца. Чтобы завершить передачу, пользователь должен взять на себя ответственность.
  • Администратор может взять на себя ответственность.
  • Пользователь, у **** которого есть право на восстановление файлов **** и каталогов, может дважды щелкнуть другие пользователи и группы и выбрать любого пользователя или группу для назначения права собственности.

Групповая политика

Параметры применяются в следующем порядке с помощью объекта групповой политики (GPO), который перезаписывал параметры на локальном компьютере при следующем обновлении групповой политики:

  1. Параметры локальной политики
  2. Параметры политики сайта
  3. Параметры политики домена
  4. Параметры политики подразделения

Когда локальный параметр серый, он указывает, что GPO в настоящее время контролирует этот параметр.

Take Ownership of Files & Folders in Windows 11/10

To take full Ownership of Files & Folders in Windows 11/10:

  1. Open File Explorer
  2. Navigate to the File or Folder you want to take ownership
  3. Right-click on the target file or folder and select Properties
  4. Select Security tab.
  5. Click Advanced button.
  6. Select the Owner tab.

Here you can change Permissions. Let us see how to do this in detail below.

With the release of Windows 10/8, Microsoft has changed the way to Take Ownership a bit. On Windows 7, it is pretty much the same as what we saw in the previous versions of Windows. There isn’t much difference even now – just that the screen has changed a bit and the way we take control has been changed, but the command line still remains the same. For instance, on Windows 7 you have an Owner tab.

We click on Edit, enter the Object name (It could be Administrators or your Windows username) or select your username from the list, and click OK to make changes.

But in Windows 11/10 and Windows 8, Microsoft has removed the Owner tab and moved it to the top. See the following screenshot.

Also, under the Permission tab, when you add a new object, you have two different views – one, the Basic permissions and the other one is Advanced permissions. Here is a screenshot of the Advanced permissions window.

How to take Ownership of files & folders

Now I’ll show you how to Take Ownership of files and folders

Step 1: Right-click on the file or folder and go to Properties Windows. Under Properties click on “Security” Tab.

Step 2: Now you can see in the above screenshot, you don’t have any permission to change it. In such cases, you need to Take Ownership of the file or folder. To do so, click on “Advanced”.

Step 3: Next, in the window that appears, you have to click on “Change” and enter the object name.

I typed in my Windows username and clicked “OK”. Now you will be able to see that the owner has changed to Shyam Sasindran.

Click on “Replace owner on subcontainers and object” and click Apply.

Once you click on Apply, you’ll see this warning message. Click on Yes to proceed.

Now you will need to click “OK” twice.

Next, again, click on Advanced.

Step 4: Now under the Advanced permissions, you will see a change, and you will see the option to add Multiple Objects

To add multiple objects and to inherit permission, you can click on “Change Permissions”.

To inherit permissions, click on “Enable inheritance”. To add a new object, click on “Add” and click on “Select a Principal” and type in the Object name.

Now you can enable the Basic Permission. If you want to enable advanced permission, click on “Show advanced permissions”.

Once you complete everything, click OK and close the window.

You should be able to access that particular file or folder. Be careful when you alter the permission for System file or folder it may cause serious damage to your system and compromise security. So please create a system restore point first and then proceed with caution.

Related read: How to Change Ownership of a File or Folder.

If you are unable to change File or Folder Permissions, then this post will show you how to troubleshoot File and Folder Permission Issues in Windows.

Method 2 — Add “Take Ownership” Option in Context Menu with TakeOwnershipEx

The alternative method for adding a “Take Ownership” option in the right-click context menu of a file or folder makes use of TakeOwnershipEx, a small utility made by Sergey Tkachenko with the purpose of giving ownership of files and folders to the current user with the click of a button.

Here’s how you can use the “Take Ownership” context menu option with TakeOwnershipEx:

1. Download TakeOwnershipEx from here.

2. Extract the downloaded archive and install the program by running the correct setup package for your Windows:

  • TakeOwnershipEx-1.2.0.1.exe — for Windows Vista, 7
  • TakeOwnershipEx-1.2.0.1-Win8.exe — for Windows 8, 8.1, 10

3. When the installation is complete, right-click on a file or folder and select “Take Ownership/Restore Rights” to take ownership with TakeOwnershipEx.

A message will come up saying that «You get full access to target»; click OK and enjoy your ownership.

(Optional)

4. After taking ownership of an item with this tool, you can give it back to the original account afterwards by right-clicking on the same item and selecting “Take Ownership/Restore Rights” again.

You can read more details about TakeOwnershipEx and its usage in this article:

How to Take Ownership and Gain Full Access to Files/Folders in Windows 10 (and Vista, 7, 8)

That’s it! Now you can easily take ownership of a file or folder in just a couple of seconds.

Включить или отключить встроенную учетную запись администратора в Windows 10 Home

Ограничением версии Windows 10 Home является то, что она не поставляется с редактором групповой политики. Таким образом, методы, описанные выше, не будут работать прямым способом в Windows 10 Home.

Если вы попытаетесь открыть консоль локального управления пользователями (lusrmgr.msc), вы получите следующую ошибку:

Эту оснастку нельзя использовать с данной версией Windows 10. Чтобы управлять учетными записями пользователей для этого компьютера, используйте инструмент «Учетные записи пользователей» на панели управления.

Но проблема в том, что вы не можете включить встроенную учетную запись администратора из инструмента учетных записей пользователей.

Так что же нам теперь делать?

Самый простой способ — добавить редактор групповой политики в Windows 10 Home.

После того, как вы установили редактор групповой политики и перезапустили систему, перейдите в меню «Выполнить» -> gpedit.msc и выполните действия, выделенные в разделе «Включение или отключение учетной записи« Администратор» с помощью редактора групповой политики».

Перезагрузите компьютер после настройки групповой политики, и вы увидите учетную запись администратора вместе с другими учетными записями на экране входа в Windows 10.

Многие другие сайты упоминали, что использование параметра командной строки будет работать в Windows 10 Home, но я не смог заставить его работать, поэтому я не рекомендую использовать параметр командной строки для включения учетной записи администратора в Windows 10 Home. ,

Turn on or turn off the TPM (available only with TPM 1.2 with Windows 10, version 1507 and higher)

Normally, the TPM is turned on as part of the TPM initialization process. You do not normally need to turn the TPM on or off. However, if necessary you can do so by using the TPM MMC.

Turn on the TPM

If you want to use the TPM after you have turned it off, you can use the following procedure to turn on the TPM.

To turn on the TPM (TPM 1.2 with Windows 10, version 1507 and higher)

  1. Open the TPM MMC (tpm.msc).

  2. In the Action pane, select Turn TPM On to display the Turn on the TPM Security Hardware page. Read the instructions on this page.

  3. Select Shutdown (or Restart), and then follow the UEFI screen prompts.

    After the computer restarts, but before you sign in to Windows, you will be prompted to accept the reconfiguration of the TPM. This ensures that the user has physical access to the computer and that malicious software is not attempting to make changes to the TPM.

Turn off the TPM

If you want to stop using the services that are provided by the TPM, you can use the TPM MMC to turn off the TPM.

To turn off the TPM (TPM 1.2 with Windows 10, version 1507 and higher)

  1. Open the TPM MMC (tpm.msc).

  2. In the Action pane, select Turn TPM Off to display the Turn off the TPM security hardware page.

  3. In the Turn off the TPM security hardware dialog box, select a method to enter your owner password and turning off the TPM:

    • If you saved your TPM owner password on a removable storage device, insert it, and then select I have the owner password file. In the Select backup file with the TPM owner password dialog box, select Browse to locate the .tpm file that is saved on your removable storage device, select Open, and then select Turn TPM Off.

    • If you do not have the removable storage device with your saved TPM owner password, select I want to enter the password. In the Type your TPM owner password dialog box, type your password (including hyphens), and then select Turn TPM Off.

    • If you did not save your TPM owner password or no longer know it, select I do not have the TPM owner password, and follow the instructions that are provided in the dialog box and subsequent UEFI screens to turn off the TPM without entering the password.

Part 1. Add the «Take Ownership» for Files Using Registry Editor Manually

Instead of heading on with several difficulties by too many steps of GUI and command line, why don’t we use a simple context menu command that instantly gives you the permission to take ownership? The following method deals with this particular technique.

Standard Warning: You may not know but Registry Editor is such a powerful tool of Microsoft that mishandling it can render your system unstable or can even make it disabled. Thus you should be cautious enough to handle it while following the steps below.

Step 1. Go to the «start» menu and type «regedit».

 

Step 2. Press enter to open the panel of registry editor by giving it permission to make changes to your PC.

Step 3. On the right side bar, scroll down to the following option called «shell».

HKEY_CLASSES_ROOT\*\shell

 

Step 4. Next you have to create a new key named as «runas». Right click on the «shell» option. Add «New» and create a «Key».

Step 5. Name the new key as «runas’. If you already find a key present as «runas», simply skip the step.

Step 7. In the property windows box, type «Take Ownership in the ‘Value Data» box and press «Ok». The value you type here will be seen as the appearing command in your context menu, so you can change it to any value as per you wish.

Step 9. You can name the new value as «No Working Directory».

Step 10. Now you have to create a new key inside «runas» key. Right click on «runas» key, select «New» and then «Key». Name the file as «command».

Step 11. Now again with the new «command» key selected, double click the «default» option to open its property window.

Step 12. In the «Value data» box type or copy paste the following code and then press ‘Ok».

cmd.exe /c takeown /f \»%1\» && icacls \»%1\» /grant administrators:F

Step 13. Once you are done with it, you have to create a new «command» key. Right click on the «command» key; select «New» and then «String Value». Name it as «Isolated Command» and then double click it to open its property window.

Step 14. Type or copy paste the same code in the «Value Data» box, and then click «Ok».

After doing the entire laborious work «Take Ownership» command will be added in you context menu to open the files which were blocked.

Also see:

1. Enable and Disable Built-in Administrator Account on Windows 10/8,8.1/7

2. User Profile Service Failed the Logon Windows 10/8/8.1/7- How to Fix?

Clear all the keys from the TPM

You can use the Windows Defender Security Center app to clear the TPM as a troubleshooting step, or as a final preparation before a clean installation of a new operating system. Preparing for a clean installation in this way helps ensure that the new operating system can fully deploy any TPM-based functionality that it includes, such as attestation. However, even if the TPM is not cleared before a new operating system is installed, most TPM functionality will probably work correctly.

Clearing the TPM resets it to an unowned state. After you clear the TPM, the Windows operating system will automatically re-initialize it and take ownership again.

Warning

Clearing the TPM can result in data loss. For more information, see the next section, “Precautions to take before clearing the TPM.”

Precautions to take before clearing the TPM

Clearing the TPM can result in data loss. To protect against such loss, review the following precautions:

  • Clearing the TPM causes you to lose all created keys associated with the TPM, and data protected by those keys, such as a virtual smart card or a sign in PIN. Make sure that you have a backup and recovery method for any data that is protected or encrypted by the TPM.

  • Do not clear the TPM on a device you do not own, such as a work or school PC, without being instructed to do so by your IT administrator.

  • If you want to temporarily suspend TPM operations and you have TPM 1.2 with Windows 10, version 1507 or 1511, or Windows 11, you can turn off the TPM. For more information, see , later in this article.

  • Always use functionality in the operating system (such as TPM.msc) to the clear the TPM. Do not clear the TPM directly from UEFI.

  • Because your TPM security hardware is a physical part of your computer, before clearing the TPM, you might want to read the manuals or instructions that came with your computer, or search the manufacturer’s website.

Membership in the local Administrators group, or equivalent, is the minimum required to complete this procedure.

To clear the TPM

  1. Open the Windows Defender Security Center app.

  2. Select Device security.

  3. Select Security processor details.

  4. Select Security processor troubleshooting.

  5. Select Clear TPM.

  6. You will be prompted to restart the computer. During the restart, you might be prompted by the UEFI to press a button to confirm that you wish to clear the TPM.

  7. After the PC restarts, your TPM will be automatically prepared for use by Windows.

Способ 1. Изменение владельца с использованием графического интерфейса Windows

  1. Откройте проводник (редактор реестра) и перейдите к папке/файлу/разделу реестра, к которому необходимо получить доступ.
  2. Изменение владельца файла или папки в Windows 10/8.1/8

    1. Нажмите правую кнопку мыши и выберите в контекстном меню Свойства
    2. Перейдите на вкладку Безопасность
    3. Нажмите кнопку Дополнительно
    4. Нажмите ссылку Изменить вверху окна параметров безопасности.
    5. После нажатия ссылки для изменения владельца вы увидите стандартное диалоговое окно выбора пользователя. Напечатайте в поле ‘Имена выбираемых объектов’ имя своей учетной записи или название группы Администраторы. Если вы не знаете точно как написать, то нажмите в окне выбора пользователя кнопку Дополнительно, а в следующем кнопку Поиск. Выберите группу Администраторы (или свою учетную запись) и нажмите кнопку OK.

      Если вы меняете владельца папки, то по умолчанию будет изменен владелец только этой папки, но не вложенных в нее папок и файлов. Для того, чтобы заменить владельца всех дочерних объектов папки, установите флажок на параметре «Заменить владельца подконтейнеров и объектов».

    После того как вы нажмете кнопку OK для изменения владельца папки, может быть показано предупреждение об отсутствии разрешений для вашей учетной записи. Нажмите кнопку Да для получения полного доступа к объекту.

  3. Изменение владельца файла или папки в Windows 7/Vista

    1. Выполните шаги
    2. Перейдите на вкладку Владелец и нажмите кнопку Изменить
    3. Группа Администраторы и текущая учетная запись будут доступны для выбора в основном окне. Если их нет, то нажмите кнопку ‘Другие пользователи и группы’ и добавьте пользователя или группу так же как описано выше для Windows 10/8 на шаге

      Если вы меняете владельца папки, то по умолчанию будет изменен владелец только этой папки, но не вложенных в нее папок и файлов. Для того, чтобы заменить владельца всех дочерних объектов папки, установите флажок на параметре «Заменить владельца подконтейнеров и объектов».

    После того как вы нажмете кнопку OK для изменения владельца папки, может быть показано предупреждение об отсутствии разрешений для вашей учетной записи. Нажмите кнопку Да для получения полного доступа к объекту.

    1. Нажмите правую кнопку мыши на подразделе реестра (в левой части редактора реестра) и выберите пункт Разрешения
    2. Нажмите кнопку Дополнительно
    3. Если вы используете Windows 10 или 8, выполните шаги и инструкции изменения владельца файлов и папок

      Если вы используете Windows 7 или Vista, выполните шаги и инструкции изменения владельца файлов и папок

  4. Установка разрешений объекта для учетной записи

    1. На вкладке Безопасность нажмите кнопку Изменить под списком пользователей и групп
    2. Нажмите кнопку Добавить
    3. Введите имя своей учетной записи и нажмите ОК

      Если вы не знаете точно как написать, то нажмите в окне выбора пользователя кнопку Дополнительно, а в следующем кнопку Поиск. Выберите свою учетную запись и нажмите кнопку OK.

    4. Установите необходимые разрешения. Если установить разрешение Полный доступ, то вы автоматически получаете все перечисленные ниже

Изменение параметров UAC в редакторе реестра

Отключение UAC и выбор любого из четырех вариантов работы контроля учетных записей Windows 10 возможен и с помощью редактора реестра (чтобы запустить его нажмите Win+R на клавиатуре и введите regedit).

Параметры работы UAC определяются тремя ключами реестра, находящимися в разделе HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows\ CurrentVersion\ Policies\ System

Перейдите в этот раздел и найдите следующие параметры DWORD в правой части окна: PromptOnSecureDesktop, EnableLUA, ConsentPromptBehaviorAdmin. изменять их значения можно по двойному клику. Далее привожу значения каждого из ключей в том порядке, как они указаны для разных вариантов оповещений контроля учетных записей.

  1. Всегда уведомлять — 1, 1, 2 соответственно.
  2. Уведомлять при попытках приложений изменить параметры (значения по умолчанию) — 1, 1, 5.
  3. Уведомлять без затемнения экрана — 0, 1, 5.
  4. Отключить UAC и не уведомлять — 0, 1, 0.

Источник

Taking Ownership and Gaining Full Access to a File/Folder Using TakeOwnershipEx

This handy tool can give you ownership and full access to a file or folder of your selection, with the click of a button. Furthermore, it can revert ownership and permissions to those items, again with just a single click.

Step 1: Download and Install TakeOwnershipEx

First, download from here the archive that includes TakeOwnershipEx. Extract it afterwards, and then run the included setup package.

Note that there are two executables in the archive:

  • TakeOwnershipEx-1.2.0.1.exe — for Windows Vista, 7
  • TakeOwnershipEx-1.2.0.1-Win8.exe — for Windows 8, 8.1, 10

Step 2: Run TakeOwnershipEx

After the installation of the program is completed, run it. You will see two buttons on its window: Take Ownership and Restore Ownership. Select Take Ownership.

Step 3: Select File/Folder

From the dialog that opens, select the file or folder that you want to take ownership of and gain full access to, then click OK.

Done! A message will pop up stating that you now full access to the item you selected.

Step 3: Restore Ownership and Permissions

You can revert back to the original owner and permissions just as easy:

First, click the Restore Ownership button in TakeOwnershipEx’s window to display all items that you’ve got full access to using it.

From that linst, mark the desired item and hit Restore rights.

A message will appear, informing you that ownership and rights are restored to the original account.

Done!

Получаем доступ стандартными средствами Windows

Рассмотрим на примере системного файла explorer.exe

По умолчанию ничего с ним мы сделать не можем. Жмем на нем правой кнопкой мышки и выбираем Свойства

Переходим на вкладку Безопасность и жмем Дополнительно

В открывшемся окошке переходим на вкладку Владелец и жмем Изменить…

Сделаем себя владельцем этого файла

Предупреждение безопасности Windows

Жмем OK во всех окнах для применения изменений.

Теперь необходимо дать права нашей учетной записи

Снова вызываем контекстное меню на файле explorer.exe (правой кнопкой мышки нажав на файл) и выбираем Свойства

Переходим на вкладку Безопасность жмем Изменить…

Выбираем пользователя или группу пользователей которой мы хотим дать права. Устанавливаем галочки на нужных разрешениях и жмем ОK. 

Пробовал давать разрешения для группы Администраторы и Пользователи все работает. Права выдаются.

Если нужного пользователя нет в списке — жмем Добавить

Жмем Дополнительно

Жмем Поиск и внизу выбираем нужного пользователя

Жмем ОК

и задаем необходимые разрешения добавленному пользователю или группе

Когда вы поработали с системными файлами (например заменили нужные) желательно вернуть права обратно.

Возвращаем права на файл или папку

На вкладке Безопасность жмем Изменить… Выбираем нашего пользователя или группу пользователей которым мы дали расширенные права и возвращаем их обратно сняв галочки которые мы установили

Поставим старого владельца

Вызываем контекстное меню на файле и выбираем Свойства. Переходим на вкладку Безопасность жмем Дополнительно

В открывшемся окошке переходим на вкладку Владелец и жмем Изменить…

В открывшемся окошке жмем Другие пользователи или группы… так как у нас владелец файла explorer.exe был TrustedInstaller и его в списке мы выбрать не можем

В поле «Введите имена выбираемых объектов» вводим

NT SERVICE\TrustedInstaller

жмем ОК

Выбираем в качестве владельца появившуюся группу TrustedInstaller и жмем ОК

Появляется уже знакомое окошко

Установлен нужный владелец. Жмем ОК

Так же ОК жмем в остальных окнах для применения изменений.

Мы вернули права для системного файла explorer.exe группе TrustedInstaller.

Добавление каскадного меню с пунктами смены владельца на текущего пользователя и на TrustedInstaller

В прошлых примерах мы использовали подраздел реестра runas, команды по умолчанию из которого запускаются с запросом повышения прав, то есть по сути выполняется запуск от имени администратора. Добавление каскадного меню с несколькими пунктами не дает такого преимущества, но запуск команд от имени администратора необходим для их выполнения.

Есть несколько путей решения этой проблемы, но использование сторонней утилиты для запуска команды с повышением привилегий все-таки является самым быстрым и простым в данном случае.

Таких утилит несколько, каждая из них обладает своими преимуществами, но большинство из них являются проектами энтузиастов и не поддерживаются и не дорабатываются уже довольно долгое время.

Исключение составляют NirCmd от известного разработчика полезных утилит Nir Sofer и PsExec Марка Руссиновича.

Я остановил свой выбор на NirCmd ввиду того, что уже использую эту утилиту для других задач, а PsExec все более узкоспециализированная утилита.

Весь процесс добавления пунктов меню и создания каскадных меню уже был рассмотрен на страницах блога.

  1. Cкачайте NirCmd x86 (для 32-разрядных систем) или NirCmd x64 (для 64-разрядных систем)
  2. Скопируйте файл nircmd.exe из архива в папку WindowsВы можете этого не делать, но в таком случае вам придется модифицировать предложенные файлы реестра и указать полный путь к nircmd.exe
  3. Скачайте архив Take_OwnerShip_Restore_Owner_Cascade.zip и извлеките reg-файлы из него в отдельную папку
  4. Запустите файл Add_Take_Ownership_Restore_Owner.reg для добавления меню

Для удаления этого меню используйте файл Remove_Take_Ownership_Restore_Owner.reg

How to add a ‘Take Ownership’ option to the right-click context menu

Important: Before you go through this guide, you should know that modifying the registry is risky, and it can cause irreversible damage to your installation if you don’t do it correctly. It’s recommended to make a full backup of your device before proceeding. Alternatively, you can create a system restore point, which will also help you to revert the changes you make using this guide.

To add a «Take Ownership» option to the right-click menu, do the following:

  1. Open Notepad.
  2. Copy and paste the following registry code into the text file:

    Windows Registry Editor Version 5.00
    
    
    @="Take Ownership"
    "NoWorkingDirectory"=""
    
    
    @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
    
    
    @="Take Ownership"
    "NoWorkingDirectory"=""
    
    
    @="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
    
  3. Click File.
  4. Click Save As.
  5. Under «Save as type,» select All Files, and name your file anything you want with the .reg extension.
  6. Click Save.
  7. Double-click your new .reg file to merge into the registry.
  8. Click Yes.
  9. Click OK.
Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *