Dear All:
  I am a newbie in WIX. I am using WIX 3.0.
  I have two questions to ask.
 
  1: How can I change the permission of an existing folder and all its
subfolders and files. The following code will just change the permission
on the folder only, but not its subfolder and files. Is there anything I
did wrong here?
              <Directory Id="myDir" Name="MyDirectory">
                <Component Id="C_MyDirectory" DiskId="1"
Guid="D8F0ECF7-4590-4758-A30E-AB1C8B542C20">
                  <CreateFolder>
                    <Permission ChangePermission="yes" Traverse="yes"
GenericAll="yes" TakeOwnership="yes" CreateFile="yes"
WriteAttributes="yes" WriteExtendedAttributes="yes" User="[LogonUser]"/>
                    <Permission User="System" ChangePermission="yes"
Traverse="yes" TakeOwnership="yes" GenericAll="yes"
WriteExtendedAttributes="yes"/>
                    <Permission User="Administrators"
ChangePermission="yes" Traverse="yes" TakeOwnership="yes"
GenericAll="yes" WriteExtendedAttributes="yes"/>
                  </CreateFolder>
                </Component>
             </Directory>
 
 2: How can I change the permission of an existing file. The following
piece of code will not work on an existing file for some reason. First,
I will have to specify a source for this file otherwise when I compile
the WXS file, the compiler will complain the source does not exist. But
the point is, this file should already exist on the machine that runs
the installer, therefore, the file should not be copied by the installer
again (Why would the compiler need the real source file to compile?),
what if the file on the machine runs the installer was already changed,
I do not want to overwrite the existing file with the one copied by the
installer. Secondly, if I specify a source of this file (by giving it a
source point to a real file on the compiler machine), the WXS file
compiled, but when I run the installer, the permission of the file would
not change.
 
            <Directory Id="myDir" Name="MyDirectory">
              <Component Id="C_MyDirectory" DiskId="1"
Guid="0E008164-F8DC-4981-8607-456A73137909">
                  <File Id="MyFile" KeyPath="yes" DiskId="1"
Name="MyFile.xml" >
                    <Permission ChangePermission="yes" GenericAll="yes"
TakeOwnership="yes" WriteAttributes="yes" WriteExtendedAttributes="yes"
User="[LogonUser]"/>
                    <Permission User="System" ChangePermission="yes"
TakeOwnership="yes" GenericAll="yes" WriteExtendedAttributes="yes"/>
                    <Permission User="Administrators"
ChangePermission="yes" TakeOwnership="yes" GenericAll="yes"
WriteExtendedAttributes="yes"/>
                  </File>
              </Component>
            </Directory>
 
Please help me out with solutions on the two problem. I am dying to know
the answers. Your kind help will be very appreciated.
 
Yongzhi
Yongzhi Yu
Latitude Geographics Group Ltd.
[EMAIL PROTECTED] www.latitudegeo.com
<file:///C:/Documents%20and%20Settings/yzyu/Application%20Data/Microsoft
/Signatures/www.latitudegeo.com> 
Head Office: 204 Market Square Victoria, BC Canada V8W 3C6
Tel: (250) 381-8130 Fax: (250) 381-8132 

Geocortex Internet Mapping (www.geocortex.com
<http://www.geocortex.com/> ) - Helping people succeed with web-based
geography

 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to