#29 Trying to use WiX to install documentation in new directory structure

open
nobody
None
1
2013-11-16
2013-02-07
Allan Lillebaek
No

Hi,

I'm new at this, to searched the WiX Toolset homepage for a solution on creating new folders, and copying some documentation into the bottom level ones.

The install procedure work fine, but the folders I want to create, isn't created as expected.

I found your WiX Tutorial – Creating directories, and tried implementing this into my wxs file.

Does it matter whether I create this as an X86 or X64 msi file?

Hope you have that small hint, that will make everything fall into place 

Mvh./Rgds.
Allan Lillebæk

TEST
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="DOCSDIR" Name="Test folder"/>
</Directory>
</Directory>

        <DirectoryRef Id="DOCSDIR">
            <Component Id="Docs" Guid="8592d02e-ba89-4c6b-96f4-2786e01765bf">
                <CreateFolder />
                <File Id="HELPTOC" Name="TableOfContents.xml" DiskId="1" Source="TableOfContents.xml" KeyPath="yes" />
            </Component>
        </DirectoryRef>

        <Feature Id="Complete" Title="Test Help Content" Description="Test help description " Display="expand" Level="1" ConfigurableDirectory="DOCSDIR">
            <Feature Id="MainDocumentationSet" Title="Test documentation" Description="The set of test documentation." Level="0">
                <ComponentRef Id="Docs" />
            </Feature>
        </Feature>

I expected this to create the folder “Test folder” below my C:\Program files (x86) folder, and that’s what the installer screen shows.
When I click Install, my product is registered in Windows, but the folder isn’t created, and my TableOfContents.xml document isn't installed either.
This was for testing, because what I actually wanted, was to create several folders below each other like this:

ACTUAL NEED
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="DHSINSTALLLOCATION" Name="HelpServer">
<Directory Id="CONTENTDIR" Name="Content"> <=== This folder and above exists prior to running the install program
<Directory Id="SOLDIR" Name="ExtraHelp">
<Directory Id="LANGUAGEDIR" Name="EN-US">
<Directory Id="ARTDOCSDIR" Name="Art"/>
<Directory Id="LOCALDOCSDIR" Name="Local"/>
<Directory Id="DOCSDIR" Name="Help documents"/>
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>

        <DirectoryRef Id="SOLDIR">
            <Component Id="SOLDIR" Guid="3da51be5-14d0-4d28-9a26-0018dc5499a3" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
                <CreateFolder/>
            </Component>
        </DirectoryRef>
        <DirectoryRef Id="LANGUAGEDIR">
            <Component Id="LANGUAGEDIR" Guid="71a5913e-5152-44a5-ae87-d067adc9e1db" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
                <CreateFolder/>
            </Component>
        </DirectoryRef>
        <DirectoryRef Id="ARTDOCSDIR">
            <Component Id="ArtDocs" Guid="dc6a44ae-bc27-4f39-8d0d-3a675a33e9a8" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
                <CreateFolder/>
                <File Id="ART001"     Name="ContentPane1.jpg"                                                                                      DiskId="1" Source="ContentPane1.jpg" />
                <File Id="ART002"     Name="ContentPane2.jpg"                                                                                      DiskId="1" Source="ContentPane2.jpg" />
                <File Id="ART003"     Name="ContentPane3.jpg"                                                                                      DiskId="1" Source="ContentPane3.jpg" />
            </Component>
        </DirectoryRef>
        <DirectoryRef Id="LOCALDOCSDIR">
            <Component Id="LocalDocs" Guid="c03f44ad-bf26-462b-a565-15985ae3ac27" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
                <CreateFolder/>
                <File Id="LOCAL001"   Name="footer.gif"                                                                                                    DiskId="1" Source="footer.gif" />
            </Component>
        </DirectoryRef>
        <DirectoryRef Id="DOCSDIR">
            <Component Id="HelpDocs" Guid="8592d02e-ba89-4c6b-96f4-2786e01765bf" SharedDllRefCount="no" KeyPath="no" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no" Location="either">
                <CreateFolder/>
                <File Id="IWFHELPTOC" Name="TableOfContents.xml"                                                                        DiskId="1" Source="TableOfContents.xml" KeyPath="yes" />
                <File Id="IWFHELP001" Name="MW_IWInvoiceWorkflow.docm"                                                    DiskId="1" Source="MW_IWInvoiceWorkflow.docm" />
                <File Id="IWFHELP002" Name="MW_IWInvoiceWorkflow.htm"                                                       DiskId="1" Source="MW_IWInvoiceWorkflow.htm" />
                <File Id="IWFHELP0039" Name="MW_IWInvoiceWorkflow.mht"                                                     DiskId="1" Source="MW_IWInvoiceWorkflow.mht" />
            </Component>
        </DirectoryRef>

        <Feature Id="Complete" Title="MW-InvoiceWorkflow Help Content" Description="Electronic handling and approval of invoices for Microsoft Dynamics AX" Display="expand" Level="1" ConfigurableDirectory="MWSOLUTIONSDIR">
            <Feature Id="MainDocumentationSet" Title="MW-InvoiceWorkflow Documentation" Description="The set of MW-InvoiceWorkflow documentation." Level="0">
                <ComponentRef Id="SOLDIR" />
                <ComponentRef Id="LANGUAGEDIR" />
                <ComponentRef Id="ArtDocs" />
                <ComponentRef Id="LocalDocs" />
                <ComponentRef Id=" HelpDocs " />
            </Feature>
        </Feature>

Discussion