Search code examples
wixinstallationcustom-action

Howto create Directory in Temp Install Dir for Custom Action


I've got an C# Wix Custom Action which is reponsible for setting up Datatabase. All needed Dlls are extracted during Installation into C:\windows\installer\currentinstalldir.

So thats fine. The needed Sql Files are in the same Directory, but they have to be copied to C:\windows\installer\currentinstalldir\sqlscripts.


Solution

  • I've found a way to get what i want.

    This code used as PostBuild Function does what i need.

    %wix%SDK\MakeSfxCA.exe “$(TargetDir)$(TargetName).CA$(TargetExt)” “%wix%SDK\x86\SfxCA.dll” “$(TargetPath)” “$(TargetDir)Microsoft.Deployment.WindowsInstaller.dll”
    

    Found on buildmaestro

    But due to a limitation of cmd.exe (max Chars) I could not add all files I need.

    My Workarround ist to Install these Files as a hidden feature and pass the Directory via Install Property to my Custom Action.