1.

Solve : icacls command in Windows Vista?

Answer»

Hi All,

I've RECENTLY got a new computer with WINDOWS Vista on it and had some problems accessing the files I transferred  from my old computer (Windows XP).

Though I could change the ownership of all the transferred folder along with all of the files and sub-folders within it, this didn't grant my username (which is defined as Administrator) permission to access these files, and that has to be done separately for each file. As there are a LARGE number of files, that is hardly a practical solution.

I was suggested to run command PROMPT as an administrator and after browsing to the relevant folder type:
icacls . /grant USER:(OI)(CI)(F) /L /T /Q
(Where USER is my username) . I did that, but I keep getting that "USER:(OI)(CI)(F)" is an 'invalid parameter' .

Any idea why? (I of course changed 'user' to my username, and even tried 'Users' so it will apply to all the users of the computer)

Thank you for any suggestions!!

R.Just issue the file or folder NAME as a wild card (using *) and it will work.

Run Dos as administrator
 To do so click start, type "cmd", right click on the icon that appears on the top and click on 'Run as administrator. This way you'll have DOS running for the administrator. From there here is an example of icacls command with a wildcard:
If the file name is " VirusesAndSpyware" or the folder name is "Spyware terminator" just go:

icacls  Viru*  /grant  John15:f 
(With "John15" being the name of the administrator you logged on the computer with when you booted windows)

The second case, with the folder being "spyware terminator" could go:

icacls  spyw*  /grant  john15:f


By the way, remember you have to take ownership 1st, before doing the icacls command. To do so, still at the dos prompt, if the file is VirusesAndSpyware, you go:

takeown  /f  Viru* /a  /r
or for the directory "spyware terminator":
takeown  /f  Spy* /a  /r

Enjoy.



Discussion

No Comment Found