Setting Permissions using SetACL

My last post for using cacls for providing permissions seems to be not working well for applying permissions on folders under program files, so i have modified the script a bit and used SetACL to give permissions . Following is the script to give permissions. I m also adding script to apply permissions on registry. Do let me know if you face any issues.