WiX Installer FileSearch with full file path -



WiX Installer FileSearch with full file path -

i'm creating msi using wix, , msi accepts user-input property, path file name installer logic using. i'm trying validate property determining whether file exists, total file path can't figure out how cooperate directorysearch , filesearch pattern.

so, user runs msi like: msiexec /i myinstaller.msi customfile="c:\test\input.txt"

i need run like:

<property id="customfileexists"> <directorysearch id="locationconfigdirsearch" path="[customfile_dir]" depth="0"> <filesearch name="[customfile_filename]"></filesearch> </directorysearch> </property>

but i:

can't figure out how split filename parts. path.getdirectory([customfile]) , path.getfilename([customfile]) ideal. or; can't figure out how determine whether file exists using total file name as-is. example, property on directorysearch ignorefilename="true", know such property not exist.

do need go extent of writing extension code or custom action? i'm hoping simple plenty requirement won't need go far.

the filesearch element abstraction signature table in windows installer. filename column doesn't back upwards formatted info type can't set property in attribute.

what might able standardize on fixed filename , have user provide property directory path rather file path. think you'd able utilize appsearch find file in directory without writing custom action.

otherwise custom action simple discovery without state changes isn't worst thing in world. careful not introduce hosting fragility. activescript (vb/jscript) back upwards in windows installer notoriously fragile. find c#/dtf managed custom actions acceptable not does. leaves c/c++ can solid harder code. simple ca should pretty straightforward.

wix installer windows-installer

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -