Take Ownership tweak removes Run as Admin

I installed this Tweak today, very interesting! My reason is I have pulled my HDD (laptop power connector cracked off of mobo!), and am trying to remove all personal info.

Have given up on that, as I'm in a hurry to get the mobo repaired.

Call me paranoid, but I'd never take a computer for repair with a HDD full of info. 1st time I've run into something I can't fix by myself.:cry:

1) I cannot get my XP desktop to boot from pulled 7 HDD via USB adapter (changed order in BIOS).

2) Could I just copy whole (extra) HDD contents to desktop (temp.) and then install XP on it, just for tech testing?

3) Would my XP desktop let me install XP on an external HDD is my main question. I have 2 licensed copies.

TIA!:geek:
 

My Computer My Computer

At a glance

Windows 7 Pro x64 (Upgrade, Clean Install)
Computer type
Laptop
OS
Windows 7 Pro x64 (Upgrade, Clean Install)
at least I have now got a work-around...

Hello guys, does anyone have any information about this work-around, or the code they used for the registry script?





The code for the original tweak is as follows:
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"Extended"=""
"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"
"Extended"=""
"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"
Since it uses the wildcard (*) in HKEY_CLASSES_ROOT, that should mean that this script is redefining the "runas" command for ALL file extensions, in addition to renaming "Run as Administrator" as "Take Ownership," right?

So essentially for .exe files the script is saying:
[HKEY_CLASSES_ROOT\exefile\shell\runas]
@="Take Ownership"
"Extended"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\exefile\shell\runas\command]a
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
which in essence rewrites the "runas" command??

Does it need to do this because windows will only run a script like that under the alias of a trusted windows command, "runas?"
The reason I ask is that I tried to create my own work-around that would run the take ownership script without overwriting the "runas" entry and it did not seem to work. That being said, this really is some of my first exposure to scripting or programming of any kind so I may have done it incorrectly... :

[HKEY_CLASSES_ROOT\exefile\shell\Take Ownership]
@="Take Ownership"
"Extended"=""
"NoWorkingDirectory"=""

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


Essentially, I guess that I am asking two things. What is the proper registry script for a workaround of this issue, and why is a workaround necessary in the first place?
 

My Computer My Computer

At a glance

Windows 7 Home Premium x64Intel 2617M
Computer Manufacturer/Model Number
Lenovo E220s
OS
Windows 7 Home Premium x64
CPU
Intel 2617M
Ok so I uninstalled the take ownership reg tweak I implemented and tried the one posted above, unfortunately the same problem occurs - Take Ownership works great but run as admin is missing.

So I checked the tutorial section of the forum in relation to context menu tweaks and I have managed to implement a work-around so I can have both features on the right click context menu.
:->

If it gives you problems again, another workaround is to highlight the file you wish to run as admin and, from the keyboard: ctrl+shift+enter.
 

My Computer My Computer

At a glance

Win7U 64 RTMQ95508GB GskillASUS|EAH4850/HTDI/1GD3/A
OS
Win7U 64 RTM
CPU
Q9550
Motherboard
GA-EP45-UD3R
Memory
8GB Gskill
Graphics Card(s)
ASUS|EAH4850/HTDI/1GD3/A
Sound Card
xfi Plat
Monitor(s) Displays
Dell 2405fpw
Screen Resolution
1920x1200
Hard Drives
Seagate & WD sata Drives
PSU
Antec
Case
Antec
Keyboard
MS Natural Ergonomic 4000
Mouse
Logitech MX610 USB Cordless
Back
Top