On Mon, Dec 22, 2008 at 4:09 PM, Bob Arnson <b...@joyofsetup.com> wrote:

> Colin Fox wrote:
> > I can grab the SharePoint location out of the registry, but for the life
> of
> > me I just can't seem to get that set as the TARGETDIR. TARGETDIR always
> just
> > gets reset to D:\.
> >
>
> MSI sets TARGETDIR so I'd suggest using a Directory element underneath
> the one for TARGETDIR. Just give it an Id with the same name as the
> RegistrySearch property. That's what the WiX setup does.
>

Hmm. I've tried that, but no joy.

Here is the relevant chunk from my file:

    <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" />

    <Property Id="INSTALLDIR">
        <RegistrySearch Id='SharepointRegistry' Type='raw'
        Root='HKLM' Key='SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\'
        Name='SharePoint' />
    </Property>

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="INSTALLDIR">
        <Directory Id="INSTALLLOCATION" Name="ml">

            <Component Id="ProductComponent"
            Guid="89C02981-D751-411f-9616-A202547F9D5F">

            <File Id="MLSP_asmx"...>


I actually need the files installed in a directory called "ml" in the
sharepoint dir, which is why I have it set in INSTALLLOCATION. That part
works - my files are installed under an ml directory.

But if I search for INSTALLDIR in the log, here's all I see:

...
MSI (s) (D0:B4) [16:43:37:273]: PROPERTY CHANGE: Adding INSTALLDIR property.
Its value is 'D:\'.
...

MSI (s) (D0:B4) [16:43:37:273]: Dir (target): Key: INSTALLDIR    , Object:
D:\
....
Action ended 16:43:37: InstallFinalize. Return value 1.
Action ended 16:43:37: INSTALL. Return value 1.
Property(S): INSTALLDIR = D:\
Property(S): INSTALLLOCATION = D:\ml\
Property(S): TARGETDIR = D:\
....


There is an example referenced in the tutorial that does just about the same
thing, though he's going based on the location of the .ini file. But he sets
the INSTALLDIR property the same way (just before the 3 nested directories),
and uses it the same way.

So what am I doing wrong?
-- 
Regards,
 cf
------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to