Replace, Move and Edit Protected Files in Windows

There are various occasions where you might want or need to replace some files in Windows that are system protected. For example, replacing a corrupted system file or if you are among those who like to edit Windows Shell resources and other files because they think the de facto personalization settings isn’t enough. Anyway, tinkering with system files in Windows isn’t done through mere copy-paste action. Windows uses an authentication system and by default a very special user has been privileged to edit protected files in Windows; the “TrustedInstaller” user account.  Other users are given “read and execute” permission only.

shell32_permission

So obviously, before we replace or edit any protected files we need to acquire certain permissions. There are four main ways of doing this.

  1. The easiest way is to use SysMate – System File Walker, a software which I have created that does just this job.
  2. Second method consists of acquiring the permission using File Explorer.
  3. The last method is very quick and straightforward consists of acquiring the permission using Windows Command Prompt.

Let us go through all three methods.

1) SysMate – System File Walker

  1. I recommend using SysMate – System File Walker if you don’t want to get your hands dirty and tinker with system file permissions by yourself. The download link and instructions are here at https://www.jcplaboratory.org/products/software/sysmate-system-file-walker/

2) Getting permissions using File Explorer

  1. Navigate to the file that you want to replace. Right-Click>Properties and go to the Security Tab.
  2. Before we assign permission we need to take ownership of the file and to do that click on Advanced and Change owner.

advsecurtab

Now in the Users and Groups dialog click on Advanced and then Find Now. Find your username and click OK. Please don’t be misled, your username is represented by a Single User Icon with your username and PC name appended.

select_user

You will by then notice that the ownership information has now been changed to your user account name. Click Apply and comply to any prompt.

changeuserown

Now we are back to the file’s properties’ Security Tab. Click on Edit and Add. You’ll once again get the Users and Groups dialog. Click on Advanced>Find Now and locate your user account. Then back on the Security Tab give yourself all wanted permissions by checking the CheckBoxes.

givepermis

Press OK and accept any prompt.

3) Getting permissions using Command Prompt

Using the Windows Command Processor do to this kind of job is the very straightforward.

  1. If you are using Windows 8 or above, press Windows Key + X then A to open an elevated command prompt window. You can also go to Start>Accessories>Command Prompt and run it as Administrator.
  2. To take ownership of the file type the following: takeown -f (file location) for instance if we want to take ownership on the shell32.dll file we would type in :takeown
  3. Now we need to run another command to assign the full control permission over the file. Use the following command to do that: cacls (file location) /G [your username]:F for the shell32.dll file we would type:cacls type to accept the prompt and press enter.

That is it! You can now replace and move the file using the traditional copy & paste method.

Regards,

Cédric

Did you like this?
Tip Cédric Poottaren with Cryptocurrency

Scan to Donate Bitcoin to Cédric Poottaren
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Scan to Donate Bitcoin Cash to Cédric Poottaren
Scan the QR code or copy the address below into your wallet to send bitcoin:

Scan to Donate Ethereum to Cédric Poottaren
Scan the QR code or copy the address below into your wallet to send some Ether:

Scan to Donate Litecoin to Cédric Poottaren
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Scan to Donate Monero to Cédric Poottaren
Scan the QR code or copy the address below into your wallet to send some Monero:

Scan to Donate ZCash to Cédric Poottaren
Scan the QR code or copy the address below into your wallet to send some ZCash: