Trick to Editing Protected Text Files?

psilokan

New Member
Just wondering if anyone has a trick to editing protected text files such as your hosts file (c:\windows\System32\Drivers\etc). I open Notepad or Notepad++ as an administrator but it still wont even show the etc folder, so I have to go through my explorer window and copy it to the desktop, open it there, edit it, save it, then copy it back to the protected folder, confirm over writing and then finally it's in place. It's really annoying!
 

My Computer

System One

  • CPU
    Athlon Quad-core Phenom 9950
    Motherboard
    Asus
    Memory
    6gb
    Graphics Card(s)
    ATI
    Monitor(s) Displays
    Two 17" LCD panels and one 22" Widescreen panel
In the files Properties,Security, does your account have all permissions for the file. If not click Edit and give it Permissions
 

My Computer

System One

  • Manufacturer/Model
    Lenovo Thinkpad T400
    CPU
    Intel Mobile Core 2 Duo P8700 @ 2.53GHz
    Motherboard
    LENOVO 64734VM
    Memory
    2.00GB Single-Channel DDR3 @ 531MHz
    Graphics Card(s)
    Intel Mobile Intel 4 Series Express Chipset Family
    Sound Card
    Conexant 20561 SmartAudio HD
    Monitor(s) Displays
    15 inch
    Screen Resolution
    1280 x 800
    Hard Drives
    1x 180GB Intel 530 series SSD
    1 x 120GB Hitachi 5400rmp
    1 x 650GB Western Digital Elements 5400rpm
    1x 1Tb Western Digital Elements 5400rpm
    Internet Speed
    Medium for New Zealand
    Other Info
    Weakest part of my computer is the graphics chipset.
    Only ever used a laptop.
    Also use USB Freeview TV Card
    Lenovo Docking Station
    External Speakers
    Other bits a pieces as needed
You must be an administrator to edit the read only file.

Right mouse & change the read only protection.
edit file
set protection again.
 

My Computer

System One

  • Manufacturer/Model
    HP-Pavilion m9280.uk-a
    CPU
    2.30 gigahertz AMD Phenom 9600 Quad-Core
    Motherboard
    ASUSTek Computer INC. NARRA3 3.02
    Memory
    3582 Megabytes Usable Installed Memory (4 Gig)
    Graphics Card(s)
    ASUS NVIDIA Geforce GTS450
    Sound Card
    Realtek High Definition 7.1 Audio (HP drivers)
    Monitor(s) Displays
    HP w2408 24.0" (Dual monitor)
    Screen Resolution
    1920 * 1200, 1920 * 1200
    Hard Drives
    3*500 Gigabytes Usable Hard Drive Capacity
    Plus 2x USB (160Gig each) external HDD
    BluRay & DVD Weiters
    HL-DT-ST BD-RE GGW-H20L SCSI CdRom (Bluray RW) Device
    AlViDrv BDDVDROM SCSI CdRom (Blueray) Device
    TSSTcorp CDDVDW TS-H653N SCSI CdRom
    Internet Speed
    40 Meg
You could always write your own edit ?????.bat file, see below: -

ECHO.
ECHO.
ECHO.
ECHO Add entries to your Hosts file?
ECHO.
ECHO.
PAUSE
IF "%OS%"=="Windows_NT" (
SET HOSTFILE=%windir%\system32\drivers\etc\hosts
)
attrib -R "%windir%\system32\drivers\etc\hosts"
ECHO.>> %HOSTFILE%
ECHO # additions>> %HOSTFILE%
ECHO 127.0.0.1 ???>> %HOSTFILE%
ECHO 127.0.0.1 ???>> %HOSTFILE%
ECHO 127.0.0.1 ???>> %HOSTFILE%
ECHO # End of additions>> %HOSTFILE%
attrib +R "%windir%\system32\drivers\etc\hosts"

ECHO Additions made
PAUSE
 

My Computer

System One

  • Manufacturer/Model
    HP-Pavilion m9280.uk-a
    CPU
    2.30 gigahertz AMD Phenom 9600 Quad-Core
    Motherboard
    ASUSTek Computer INC. NARRA3 3.02
    Memory
    3582 Megabytes Usable Installed Memory (4 Gig)
    Graphics Card(s)
    ASUS NVIDIA Geforce GTS450
    Sound Card
    Realtek High Definition 7.1 Audio (HP drivers)
    Monitor(s) Displays
    HP w2408 24.0" (Dual monitor)
    Screen Resolution
    1920 * 1200, 1920 * 1200
    Hard Drives
    3*500 Gigabytes Usable Hard Drive Capacity
    Plus 2x USB (160Gig each) external HDD
    BluRay & DVD Weiters
    HL-DT-ST BD-RE GGW-H20L SCSI CdRom (Bluray RW) Device
    AlViDrv BDDVDROM SCSI CdRom (Blueray) Device
    TSSTcorp CDDVDW TS-H653N SCSI CdRom
    Internet Speed
    40 Meg
Just wondering if anyone has a trick to editing protected text files such as your hosts file (c:\windows\System32\Drivers\etc). I open Notepad or Notepad++ as an administrator but it still wont even show the etc folder, so I have to go through my explorer window and copy it to the desktop, open it there, edit it, save it, then copy it back to the protected folder, confirm over writing and then finally it's in place. It's really annoying!

This is most likely because you do not have Admin permissions to edit any of those files

If you are using a Windows Admin Account that You created then that user is not authorized to tamper with System32

Try doing your same Techniques using the Vista Admin, Be warned all Programs you run will be run with Full Control (INCLUDING VIRUSES IF YOU HAVE ANY)

So Beware


To enable the Account see http://www.vistax64.com/tutorials/67567-administrator-account.html?ltr=A For More Information

EDIT: You may also want to see this Tutorial

See http://www.vistax64.com/tutorials/67717-take-ownership-file.html?filter[11]=Networking%20Internet For More Information

Hope This Helps,
Josh
 
Last edited:

My Computer

System One

  • Manufacturer/Model
    Custom Built
    CPU
    Intel Core i5 2400 @ 3.10GHz
    Motherboard
    Foxconn H67MP-S/-V/H67MP
    Memory
    8.0GB DDR3 @ 665MHz (2GBx4)
    Graphics Card(s)
    AMD HD Radeon 6870
    Sound Card
    Realtek High Definition Audio
    Monitor(s) Displays
    SMB1930NW (1440x900@60Hz)
    Screen Resolution
    1280x800
    Hard Drives
    977GB Seagate ST31000524AS ATA Device (SATA) + 250GB WD iSCSI attached Drive
    Case
    Novatech Night
    Keyboard
    Standard PS/2 Keyboard
    Mouse
    Dell HID-compliant mouse
Back
Top