Hi Patrick,
It's a simple text file that was turned into a reg key...
Thanks for the reply.:smile9:
Re-stating my question: Please explain what each line of modification to the registry is doing
functionally. For example, looking at the first modified key:
Code:
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
I see this conditions the default value of
HKEY_CLASSES_ROOT\*\shell\runas\command which allows a subsequent line to change the default to become
c takeown but I'm not familiar with the
"NoWorkingDirectory"="" part of this modification. Also, how does this key relate to the context menu in Windows Explorer?
Here's the complete contents of the .REG file:
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"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]
@="Take Ownership"
"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"
I'd appreciate a line-by-line explanation of how the OS reacts to these modifications in the registry as they relate to the Explorer context menu.
Maybe if I understand how these modifications are working, I can write my own .REG file to perform some other tasks.
Again, I apologize if this post belongs in a different forum.
Thank you.