none
ICacls script with deny RRS feed

  • Question

  • I wrote the following  lin in a .bat file:



    pause
    Icacls %1:\Help /deny *S-1-1-0:(OI)(CI)(WEA,D,WO,WD,WA,AD,DC,WDAC)
    pause

    EXIT

    The Problem is that I can't acces the Help folder on the USB drive, it doesn't give me permission.
    The odd thing is that when I go to the settings manually and put the settings exactly as Icacls does, it works as it should.

    When I look in properties at the rights they seem exactly the same as if I put them manually..
    I don't see the difference between the Icacls result and the manual result, but it's there since windows behaves different on the same settings (for my eye).

    any idea what I am doing wrong?

    I am trying to achieve that the Help folder is accesable and executable but not deletable nor the files in it. And nor that people can write in it. So make it read and execute only. The rest of the drive should be free for whatever purposes


    • Edited by GerbrandH Wednesday, September 19, 2018 8:53 AM
    • Moved by Bill_Stewart Thursday, December 13, 2018 3:20 PM Off-topic
    Wednesday, September 19, 2018 8:52 AM

All replies

  • ICACLS is not a script.  It is system utility program.  You need to post in the forum for you version of Windows.

    If you DENY access to EVERYONE then you will not be able to access the file.


    \_(ツ)_/

    Wednesday, September 19, 2018 9:05 AM
  • OK I will ask the question in the windows 10 forum
    Wednesday, September 19, 2018 12:19 PM