I tried to use cacls to give "Everyone" group access to certain folder. And I failed. As I understand the reason is i'm trying to use groupname in english while my windows is localized. Attempt to use localized groupname succeded. I can't predict language of target system. How can I grant permissions on folder regardless of Windows localization?
Best i could do is use version number checking, if winVersion >= 6 then use icacls else use xcacls.vbs which i ship with my script. Though xcacls is extremly slow, it works for me for now. In future - we'll see.