Archive: AccessControl plug-in causes crash


AccessControl plug-in causes crash
Hi,

after I added the following line to my Install section

AccessControlW::GrantOnFile"$APPDATA\@CPACK_NSIS_PACKAGE_NAME_LC@""(BU)""FullAccess"

the installer crashes reproducibly.

I read the wiki page (http://nsis.sourceforge.net/AccessControl_plug-in), googled and searched the forum but I couldn't find any reason.

Is there something "special" I have to pay attention to?

I am on a Windows 7 Ultimate 32Bit system.

Thanks for any help,
Gunther

Just to be clear, we are talking about unicode nsis?

I'm guessing the unicode version of AccessControl has some bugs


Anders,

Originally posted by Anders
Just to be clear, we are talking about unicode nsis?
Yes, we do (I am sure you recognized the 'W' and it was no mistake of mine ;))
I'm guessing the unicode version of AccessControl has some bugs
Oh, oh ..., that's no good. :cry:
I badly need this functionality ... :(

Do you know any other way how to set "FullAccess" rights for all users on a directory (that's "all" I need)?

Gunther

OK, now it seems to work without causing the installer to crash.

Like after any file system command/ operation I added a Sleep command. And additionally I changed the permissions setting from "FullAccess" only to "GenericRead + GenericExecute + GenericWrite + Delete + FullAccess".

I cannot say exactly why it now seems to work, but it does.

It is the second time I noticed that NSIS is not working as expected if there is a file system command/ operation immediately followed by another command that bears upon the previous one (first time it was the RMDir command).

So maybe this is a general "NSIS design" problem. And I guess that the file system operating speed differs from system to system. IMHO there should be a "mechanism" in NSIS that asures that the script is not continuing before the file system operation is completed (or raise an error if it couldn't be processed).

As a programmer it is quite impossible to take things into account that depends on the respective user system.

Currently one's code could be totally correct but does not work as expected => NSIS problem.

Or am I wrong, overlook something etc.?

Gunther


I know this is a year old but just in case anyone comes across this problem...

The real cause of this problem is that you can't use (BU) in Windows 7, you have to use the SID "(S-1-5-32-545)" instead. See http://nsis.sourceforge.net/Talk:AccessControl_plug-in


OK, I'm not understanding the correction. (I do appreciate you posting a followup solution, but don't understand it).

Are you saying that using the SID "S-1-5-32-545" instead of "(BU)" cures a problem that Netsurfer24 thought needed a Sleep to fix? Can you explain how that works?


Im using AccessControl, TextReplace plugins. Getting crash on a particular machine running Windows 7 Home 64bits. Its happening on the TextReplace line. And AccessControl is set to Everyone and FullAccess.

Any clues ?


Please supply a minimal script that reproduces the error.


It may be UAC. Even with full access on an ACL you may still not be able to write to some files depending on their location.

Stu


Actually its huge a script. What I suspects is that just after extracting some files I put the ReplaceText plugin code to replace text. So may be before file existence installer code tries to edit it.

Now I moved the ReplaceText code after all files get extracted and so far no crash on that machine.

And Im sure that this ReplaceText was the root for the crash cause every time installing it was getting crash on that section where ReplaceText was done.