View Single Post
Old 13th March 2008, 14:05   #3
Daniel James
Junior Member
Join Date: Feb 2008
Location: Near London, UK
Posts: 40
Originally posted by Afrow UK
AccessControl does not push anything to the stack if there were no errors. Therefore your value in $0 is coming from a stack item that was already on the stack before you called the plug-in.

I will change this in the next version.
OK, thanks, Stu ... that makes sense.

What's the best workaround? Is there any other indication of an error -- way to tell whether anything has been pushed onto the stack -- apart from calling pop?

I could do something like:

Push "OK"
AccessControl::GrantOnFile "$MBDir" "(S-1-1-0)" "GenericRead + GenericWrite + DeleteChild"
pop $0

${If} $0 != "OK"
MessageBox MB_OK "Error $0 granting access to $MBDir "
pop $0 ; remove the "OK"

Can you think of anything better?


Daniel James is offline   Reply With Quote