13 January 2012

Use Icacls To Gain Permissions To Edit a .SYS File

i was asked by a colleague from college to help him to be able to edit a .sys file in order for windows to ignore loading the file when booting up

icacls is a windows version of Access Control Lists

After he found a few websites on how to do it, on step 2 windows would throw up a "Access Denied" error

So i went looking and found a "Microsoft" way of doing it

1. I had to download a updated version of icacls which prevented getting the "Access Denied" error

Article describing the issue - http://support.microsoft.com/kb/947870

Download for file

32 bit - http://dl.dropbox.com/u/8589057/32%20bit/icacls.exe

64 bit - http://dl.dropbox.com/u/8589057/64%20bit/icacls.exe

2. there are 2 levels of Administrator in windows 7

(a) Administrator

(b) Elevated Administrator Level

we will be using (b)

to gain elevated Administrator privileges right click on a file and select "Run As Administrator"

3. For Windows Vista and Windows 7 Users we need to disable UAC

Click Start>Type Msconfig.exe>Press Enter

Add caption
When You Click OK you will be prompted to Reboot - You MUST Reboot Or The Settings Won't Be Set

4.copy icacls.exe and the file that needs editing, in this case, vgapnp.sys to the ROOT of C:\ do NOT put in to a folder

5. Open a Command Prompt with elevated Administrator privileges

Click Start>All Programs>Accesssories>Command Prompt
Right click on Command Prompt and click "Run As Administrator"

(a) in Command Prompt go cd\
(b) add the following exactly icacls.exe c:\vgapnp.sys /setowner "\Flan"
(c) Change my name to what user you want access to the file

7. Now the file is ready for editing - open in notepad ++ - easier to see where edit needs to go

at the top you can see 2 purple characters - M & Z

Put a x or z in front of the M - see below

8. Save The File

9. Go to C:\Windows\System32\Drivers and rename Vgapnp.sys to Vgapnp.000 - this is our backup of the original file

10. Copy the edited file from C:\ to C:\Windows\System32\Drivers

11. Depending on what the edit is supposed to do, you may have to reboot PC for changes to take effect

No comments:

Post a Comment