Cannot modify files as Administrator in Windows 7


  1. Posts : 86
    Windows7 64bit
       #1

    Cannot modify files as Administrator in Windows 7


    hi

    I cannot modify files as a real Administrator in Windows 7:

    http://www.techrepublic.com/blog/win...indows-7/3656/

    for example I cannot change this file:

    C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\en-US\cpu.html.

    Even cannot save this file if I open in notepad as Administrator.
    Last edited by upiter77; 08 Feb 2014 at 14:07.
      My Computer


  2. Posts : 86
    Windows7 64bit
    Thread Starter
       #2

    I will try to turn UAC of user Administrator off:

    Turning User Account Control on or off - Microsoft Windows Help
    Last edited by upiter77; 08 Feb 2014 at 14:07.
      My Computer


  3. Posts : 86
    Windows7 64bit
    Thread Starter
       #3

    I have turned UAC off, but it still doesn't work.
      My Computer


  4. Posts : 1,800
    Windows 7 Pro x64 SP1
       #4

    Check for the possibility of the file being listed as a system file, from an elevated prompt. type attrib filename.

    you might want to change the attributes and then resave it, change the attributes back after saving your changes.

    Rich
      My Computer


  5. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #5

    take ownership


    I tried to edit and save the file - "Access Denied"

    Took ownership (changed permissions) and could edit and save.

    Afterwards I changed everything back to how it was originally!
      My Computer


  6. Posts : 86
    Windows7 64bit
    Thread Starter
       #6

    I have treid and it doesn't work:

    Zugriff verweigert -> access denied
    Code:
    C:\Users\Administrator.asus>cd "C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE\"
    
    C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE>dir
     Datenträger in Laufwerk C: ist Win7
     Volumeseriennummer: 8491-98C4
    
     Verzeichnis von C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE
    
    13.07.2011  20:21    <DIR>          .
    13.07.2011  20:21    <DIR>          ..
    14.07.2009  04:03             4'630 cpu.html
    13.07.2011  20:21    <DIR>          css
    14.07.2009  03:58             1'020 gadget.xml
    13.07.2011  20:21    <DIR>          js
                   2 Datei(en),          5'650 Bytes
                   4 Verzeichnis(se), 310'644'457'472 Bytes frei
    
    C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE>attrib cpu.html
    A            C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE\cpu.html
    
    C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE>attrib -r +s cpu.html
    Zugriff verweigert - C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE\cpu.html
    
    C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE>attrib -r -s cpu.html
    Zugriff verweigert - C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE\cpu.html
    
    C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE>attrib +S +H cpu.html /s /d
    Zugriff verweigert - C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE\cpu.html
      My Computer


  7. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #7

    Permissions


    Try changing permissions. Change owner to PC Administrators or Username for your account.

    Cannot modify files as Administrator in Windows 7-advanced-security-settings-en-us.jpg

    Then edit permisssions

    Cannot modify files as Administrator in Windows 7-advanced-security-settings-en-us-2.jpg

    If you get really stuck just use the ICACLS or CACLS command.

    Example:

    icacls "C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget" /grant Username:F

    cacls "C:\Program Files\Windows Sidebar\Gadgets\CPU.Gadget\de-DE\cpu.html" /grant Username:F

    [EDIT]: I'm forgetting that gadgets are disabled on my machine. That's probably why I can edit the file. I reckon that you need to disable the gadget before you can make changes. Just start it again afterwards. See the tutorial here:

    Gadgets - Enable or Disable
    Last edited by Callender; 09 Feb 2014 at 09:31.
      My Computer


  8. Posts : 86
    Windows7 64bit
    Thread Starter
       #8

    Thx a lot, it works well now, but now howto change the owner back to TrustedInstaller?
      My Computer


  9. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #9

    Change owner to trusted installer

      My Computer


  10. Posts : 86
    Windows7 64bit
    Thread Starter
       #10

    Callender said:
    Thx, it works well now.
      My Computer


 

  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 23:35.
Find Us