No it will not overwrite it or cause it to be removed on uninstall. The code example is to set permissions on the windows\temp folder which pre-exists and the permission is added to the ACL of the folder.
-----Original Message----- From: CoolBreeze [mailto:coolbreeze...@googlemail.com] Sent: 14 June 2011 11:15 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Help with giving permissions to folder I do not want to recreate or overwrite the MachineKeys folder that already exists. Will adding <CreateFolder /> as you suggest below overwrite the existing folder? If so, how can I avoid that, but still add the permission I need to the folder? On Tue, Jun 14, 2011 at 5:23 AM, David Watson <dwat...@sdl.com> wrote: > The relevant parent of util:permissionex is createfolder. > > Put a component in your directory tree that has a CreateFolder with a > permissionsEx nexted in it. > > An example... > > <Directory Id="windowstemp" Name="temp"> > <Component Id="windowstempPerm" Guid="*"> > <RegistryValue Id="windowstempfolderpermissions" Type="string" > Action="write" Value="1" Root="HKLM" Key="$(var.RegistryPath)" > Name="windowstempfolderpermissions" KeyPath="yes"/> > <CreateFolder> > <util:PermissionEx GenericAll="yes" User="$(var.GroupName)" > Domain="[ComputerName]" /> > </CreateFolder> > </Component> > </Directory> > > -----Original Message----- > From: CoolBreeze [mailto:coolbreeze...@googlemail.com] > Sent: 13 June 2011 17:28 > To: General discussion for Windows Installer XML toolset. > Subject: [WiX-users] Help with giving permissions to folder > > My installer needs to encrypt the ConnectionStrings section of the > web.config file for our web application. This part I have working with no > problems, but as part of the process I need to provide the Network Service > with full control access to the following folder: > > *C:\Documents and Settings\All Users\Application > Data\Microsoft\Crypto\RSA\MachineKeys* > > I have not been able to figure out how to configure this with in my > installer. > > I've tried adding the following to my Product.wxs, but it gives a build > error of: "The Directory element contains an unexpected child element > 'util:PermissionEx'.". And xmlns:util has been added to the beginning of my > Product.wxs. > > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="WebSiteAppsFolder"> > <Directory Id="INSTALLLOCATION" Name="!(loc.ProductName)"> > </Directory> > <Directory Id="AppDataFolder"> > <Directory Id="Microsoft"> > <Directory Id="Crypto"> > <Directory Id="RSA"> > <Directory Id="MachineKeys"> > <util:PermissionEx User="NETWORK SERVICE" GenericAll="yes" > ChangePermission="yes" /> > </Directory> > </Directory> > </Directory> > </Directory> > </Directory> > </Directory> > </Directory> > > How can this be done? > > ----------------------------------------------------------------------------- > - > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > SDL PLC confidential, all rights reserved. > If you are not the intended recipient of this mail SDL requests and > requires that you delete it without acting upon or copying any of its > contents, and we further request that you advise us. > SDL PLC is a public limited company registered in England and Wales. > Registered number: 02675207. > Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 > 7DY, UK. > > > > ----------------------------------------------------------------------------- - > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ----------------------------------------------------------------------------- - EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users