Monday, June 24, 2013

Wix: how to apply special access rights to a directory

Use <CreateFolder> and <util:PermissionEx> tags.

Don't forget to add "-ext WixUtilExtension" parameter to "candle" and "light" command lines.

User needs to run installer under administrative account.

Example below gives every user generic access to application directory.

<?xml version='1.0' encoding='windows-1252'?>
<Wix xmlns=''
    <Product ... />
    <Directory Id='AppFolder' Name='My Application'>
        <Component Id='AppFolder' Guid='AC84FDFDA-F8D5-4DEF-8A68-5D8809E818D8'>
                <util:PermissionEx User="Everyone" GenericAll="yes"/>
            <File ... />
            <File ... />
            <RemoveFolder Id='AppFolder' On='uninstall' />


No comments:

Post a Comment