garazy
28th October 2003 11:40 UTC
AccessControl::GrantOnFile NT4 problem
AccessControl::GrantOnFile $INSTDIR "(S-1-5-32-545)" "FullAccess"
works great except on NT4 SP6a
I get
ConvertStringSidToSidA entry point not found in advapi32.dll
Any ideas how to get around this?
Regards,
Gary
kichik
29th October 2003 13:52 UTC
You should ask the plug-in writer. Please post the final answer here so we can all know what went wrong, in case someone ever gets this again.
garazy
29th October 2003 14:28 UTC
I did, the answer is below. I solved it by doing this, which isn't as nice but works -
Call GetWindowsVersion
Pop $R0
StrCmp $R0 "NT 4.0" nt4baddy notnt4
nt4baddy:
exec "$SYSDIR\cacls.exe $\"$INSTDIR$\" /e /g BUILTIN\Users:F"
goto done
notnt4:
AccessControl::GrantOnFile $INSTDIR "(S-1-5-32-545)" "FullAccess"
done:
And the writers response -
> AccessControl::GrantOnFile $INSTDIR \"(S-1-5-32-545)\" \"FullAccess\"
>
> Give me -
>
> ConvertStringSidToSidA entrypoint not found in advapi32.dll
Maybe you can check (for instance with the dependency walker, http://www.dependencywalker.com/), if advapi32.dll contains a symbol like ConvertStringSidToSidW? In that case defining _UNICODE or late loading of the symbol would help. If that's not the case only asking Microsoft for the source code of that function would help ;-). Well, or we could steal that function from Wine (http://winehq.com/). But when doing that, the access control plugin would have to be relicensed under the terms of the GPL.
Ciao,
Mathias
kichik
29th October 2003 14:34 UTC
According to MSDN ConvertStringSidToSid is 2000 and above only.