Hi,
I'm trying to check if a directory exists before I set its permission.
The following is a snippet from my code:
<Property Id="LOGS_DIR" Admin="yes"/>
<Property Id="LOGS.DIR.EXISTS">
<DirectorySearch Id="IsLogsDirExists" Path="[LOGS_DIR]" Depth="3"/>
</Property>
<Directory Id = "TARGETDIR" Name = "SourceDir">
<Directory Id = "LOGS_DIR" Name="Logs">
<Component Id = "LogDirComponent" Guid =
"C08E4BC1-A6CD-454e-87EF-C575B9962313">
<Condition>NOT LOGS.DIR.EXISTS</Condition>
<CreateFolder Directory ="LOGS_DIR">
<Permission User="NetworkService" GenericAll="yes" Extended="yes" />
</CreateFolder>
</Component>
</Directory>
</Directory>
>From the log files I see that when logs dir does not exist it exexcutes the
>folder create op.
( "MSI (s) (18:4C) [17:35:12:122]: Executing op:
FolderCreate(Folder=C:\MobileSearch\Logs\,Foreign=0,)" ). However, when it does
exist, then only if I run the msi using msiexec and pass a value to LOGS_DIR
like: LOGS_DIR=c:\VSLogs\logs then it gets the right value, if I don't pass any
parameter it gets the value "c:\".
This behavior makes sense since the value of LOGS_DIR is not set to the right
value at the beginning if no parameter was passed. Currently, I'm trying to
find the right solution by trial and error.
Is there a generic solution that will enable me to check if a folder exists
before I set its permission?
Thanks,
Ravit
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users