The <Permission> element references user accounts by name. It's fine to reference a user you're creating under a component because the ConfigureUsers custom action (which schedules the CreateUser action) is scheduled before the InstallFiles action and therefore the user should be created before any files are installed and the permissions set.
 
(ConfigureUsers is referenced by the compiler in ParseUserElement in src\wix\Compiler.cs, and is defined in src\ca\serverca\scawixlib\sca.wxs. The actual function is implemented in src\ca\scasched\scasched.cpp.)
 
If you need to create the user from multiple features which might be selected independently of each other, you should include the component which creates the user in all features. It should be OK (I think) to have the component only create the user and not contain any files. It does mean that the key path of the component will be the <Directory> that it's contained in.
 
--
Mike Dimmick


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas Watts
Sent: 10 October 2006 17:06
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Create User and Set Permissions

I need to create a new local system user and set permissions for this user on multiple directories.  I know that I can create the user as follows:

<Component Id="AppServerComponentCreateUsers" DiskId="1" Guid="CEEF3186-A2AF-4363-BBE0-42472A221001">

   <User Id='MyUserID' Name='MyUser' Password='password' FailIfExists='no' CreateUser='yes' PasswordExpired='no' PasswordNeverExpires='yes' RemoveOnUninstall='no' UpdateIfExists='no'>

      <GroupRef Id='MyUserGroup' />

   </User>

</Component>

 

However, this component exists under a specific directory element.  I need to set permissions for this new user for several directories.  How do I do this?

__________

Doug Watts

 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to