My app writes log using log4net in the appinstalldirectory\log directory but the app is not able to create log directory and create file. It was because on security tab current login user which is local admin in windows 10 was not added as list of user who has full access to that folder.
Thus in wix installer I have created a component as below
<CreateFolder>
<util:PermissionEx
GenericAll="yes"
CreateFile="yes"
User="[UserSID]"
Domain="[%USERDOMAIN]"/>
<!--<Permission
GenericAll="yes"
CreateFile="yes"
User="[UserSID]"
Domain="[%USERDOMAIN]"/>-->
</CreateFolder>
With PermissionEx the installer doesn't complete and show message as below
https://i.stack.imgur.com/SiCbk.png

But when is used I get error as below
https://i.stack.imgur.com/AXNpO.png

When I check the usersid in command I can see that usersid
https://i.stack.imgur.com/KDVpC.png

Could some one please point me what is wrong or what should I do? I don't want to keep modifying every system and grant current user full access so that my app can write log.
Use the username, not the SID