Take Ownership tweak removes Run as Admin

Page 3 of 3 FirstFirst 123

  1. Posts : 43
    Windows 7 Pro x64 (Upgrade, Clean Install)
       #21

    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.

    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!
      My Computer


  2. Posts : 1
    Windows 7 Home Premium x64
       #22

    tylor said:
    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


  3. Posts : 1,127
    Win7U 64 RTM
       #23

    tylor said:
    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


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:19.
Find Us