Archive: AccessControl plugin always returns "bad flag" error


AccessControl plugin always returns "bad flag" error
I’m trying to set permission flag to $INSTDIR located under Program Files folder and always returns bad flag error.

After all files have been copied I put the following line:

AccessControl::GrantOnFile \ "$INSTDIR" "(S-1-5-32-545)" "FullAccess"

I am executing the installer as Administrator in win2K. I have tried with several SIDs but always get the same error.

Any suggestions?


The "\" is a line escape character if used as the last character on the line. If it's not, then it makes the code not to work as expected. You should use this instead:

AccessControl::GrantOnFile "$INSTDIR" "(S-1-5-32-545)" "FullAccess"

or this:
AccessControl::GrantOnFile \
"$INSTDIR" "(S-1-5-32-545)" "FullAccess"