SOLVED Total control via contextual menu ???

Joined
Oct 24, 2016
Messages
167
Reaction score
27
hi,

I found a script that would give total control using the contextual menu on the desktop.
This one is for you Regedit32, what do you think of it ?
And would it work with Windows 10 ?
Here I joined this script and i will wait for your advice regarding this tweak. :)

Thank You for looking at this.:)

Regards JAY B.
 

Attachments

  • Total control.txt
    1.8 KB · Views: 475

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Hi Jay B,

The REG code you provided will indeed modify the Windows 10 Registry in a such a way that you can then right-click on a folder or file that is controlled by the NT Service\TrustedInstaller or by SYSYTEM.

It requires that the icacls.exe is present in the C:\WINDOWS\System32 directory

Just be aware though when you take full control over from the TrustedInstaller or SYSTEM you may in some instances cause System instability, so be cautious if you do this.

If you merge the REG file your right-click Context menu ought to display an additional option like this:

controltotal.png


You will only see that additional option when you right-click on a file/folder that you currently have no control over.
 
Joined
Oct 24, 2016
Messages
167
Reaction score
27
Thanks Regedit32,

One more question if you don't mind ?!??

How do I use this script ?
Do I copy/paste it into cmd.Admin ?
The way to use it wasn't very clear where I found it.
As You said I will use extreme caution when using it, if I do use it ! :)

It requires that the icacls.exe is present in the C:\WINDOWS\System32 directory

I looked for it and it is present.

Thanks again :)

I'll wait for your reply :)

regards JAY B. ;)
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Some additional notes for you Jay B.

The REG information you provided will work as is, but you should not in a typical Windows 10 installation, the HKEY's and Values it is adding to the Registry do not exist.

In your REG code you'll see a few entries such as this one:

Code:
[-HKEY_CLASSES_ROOT\*\shell\runas]

This command instructs the HKEY to be deleted.

This in essence is not necessary, as the HKEY does not exist, but its possible the author of this REG code has updated a previous Registry Modification which created this and other keys, and hence needed to include it in the REG code.


So if we start with the premiss that none of the HKEYs or Values being added exist all ready, you could tidy up the REG code like so:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Controle Total"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Controle Total"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="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"

[HKEY_CLASSES_ROOT\dllfile\shell\runas]
@="Controle Total"
"HasLUAShield"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\dllfile\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="Controle Total"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="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"

This would achieve the same as the REG code you posted - provided none of these HKEYs all ready exist from previous attempts to modify the Registry.


If you take a close look at your REG code you will see the following line of code appears four times

Code:
@="Controle Total"

If you change each of the 4 lines like the above one to read: @="JAY B's Full Control" then your right-click Context menu will display the following:

jayb.png


Now, because modifying the Registry can be risky, here is the REG code you need, should you later decide to remove this option from the right-click Context menu

Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\runas]

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

[-HKEY_CLASSES_ROOT\dllfile\shell]

[-HKEY_CLASSES_ROOT\Drive\shell\runas]


One final note: As there are some circumstances where taking full control could potentially create System instability, I would highly recommend you create a restore point before taking full control of a file/folder.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
Not a problem JAY B.

Here is your REG code without that statement in French:

Code:
Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\runas]

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Controle Total"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Controle Total"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="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"

[-HKEY_CLASSES_ROOT\dllfile\shell]

[HKEY_CLASSES_ROOT\dllfile\shell\runas]
@="Controle Total"
"HasLUAShield"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\dllfile\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[-HKEY_CLASSES_ROOT\Drive\shell\runas]

[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="Controle Total"
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="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"

  • Right-click on your Desktop and select New > Text Document
  • Don't worry about its name at the moment: just open the New Text Document
  • Now copy your REG CODE then right-click inside the New Text Document and select Paste
  • At the top of the New Text Document click File > Save as
  • In the window that pops open, you will see the File name field is highlighted
    • Type your file name to replace the highlighted text. You can call it whatever you like, but you must include .reg at the end of name
    • Now in the Save as type field click the drop arrow and select All Files (*.*)
Sample image

sample3.png


Now click
the Save button

For ease of access perhaps choose to save it to your Desktop for now.

That will create the following file on your Desktop:

sample4.png


Note: The name may vary depending on what you decide to name the file

When that file appears, right-click and select Merge then you will receive three prompts to which you need to click, Yes, then Yes again, and finally OK

 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
I've attached the REG files which you can download if you prefer.
  • Full Control.reg is what you use to modify the Registry to give you the choice of Full Control in your right-click Context menu
  • Undo Full Control.reg if merged will remove the modifications made by the other file, thus removing your ability to choose Full Control from your right-click Context menu

If you choose to download either of these files, before running please scan with your antivirus software.

When you are happy they are safe, then to use either of the files:
  • Right-click on the file and select merge
  • Click Yes to the UAC prompt
  • Click Yes to the Registry Warning Prompt
  • Click OK to the Registry Information Prompt
 

Attachments

  • Full Control.reg
    1.6 KB · Views: 413
  • Undo Full Control.reg
    200 bytes · Views: 446

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
One last note.

When you have the Full Control.reg file present.

You can right-click and select Edit which will open it in a Notepad.
  • Note you may see a prompt that requires you to click run for it to open in the Notepad
  • You can now edit the file, so for example you could locate the four locations where it currently says:
Code:
@="Controle Total"

and replace that line with

Code:
@="JAY B's Full Control"

Then click File > Save

Now when you right-click on Full Control.reg and select Merge then click yes, yes, OK your right-click Context menu will show:

jayb.png


Thank you very much for sharing your REG code discovery. I'm sure many will find it a useful modification to make.

Regards,

Regedit32
 
Joined
Oct 24, 2016
Messages
167
Reaction score
27
Hi Regedit32,

Thank you for your time explaining the way to do it properly.

Before doing anything I will think about it a lot !

I thouhgt this would be usefull in some case requiring higher permission.

As for now my Windows 10 is working great so I should wait before I make a mistake ! :p

Thanks for sharing your knowledge ! :)

Regards :) JAY B.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
You're welcome JAY B.

Making the actual modification to the Registry will cause no harm.

It will only be when you choose to take control of a file/folder you will need to exercise caution. That is the point where it would be wise to create a restore point before taking control.

If it does concern you to modify the Registry, then creating a restore point before you modify the Registry means you can use System Restore to return your Registry to the state it was before you modified it too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top