I'm a complete newbie to WiX and Windows Installer. I've worked through the
tutorials and documentation, and feel pretty comfortable with all the
basics. Now I'm trying to create an installer to fit my requirements, and
while the basic install of the app and shortcuts, including conditions, and
custom UI, works just fine, I'm struggling with a special requirement.

What I have is an app that can run standalone, or can act as an add-on to a
3rd-party software package. I can install the app just fine, but in order to
add a reference to my app on the toolbar of the 3rd-party software, I need
to install some XML files to the user's %Application Data% folder. I started
with:

<Directory Id="AppDataFolder">
        <Directory Id="3rdPartyAppData" Name="3rdParty">
                <Directory Id="3rdPartyAppDataSubfolder" Name="Subfolder">
                        <Component Id="3rdPartyToolbar" Guid="PUT-GUID-HERE">
                                <File Id="Toolbar" Name="an.xml" 
Source="the.xml" DiskId="1"
KeyPath="yes" />
                        </Component>
                </Directory>
        </Directory>
</Directory>

but I get an ICE38 error that says I can't use the file as the KeyPath. I
don't understand why that's the case, since I can use my app's file as the
KeyPath in the primary component (not shown). I tried searching online for
this issue, but all I found were people placing shortcuts into the user's
profile, not files. Perhaps I'm installing this file in a non-standard
manner. Is there another recommended way to do this? In a similar manner as
for shortcuts - but what I feel is a hack in this situation - I can add a
registry value to the Component tag as the KeyPath to prevent this error.

However, I also get a couple ICE64 errors about these user profile
directories not being in the RemoveFile table. I thought I'd solve those
issue by adding the following within the Component tag:

<RemoveFolder Id="3rdPartyAppDataSubfolder" On="uninstall" />
<RemoveFolder Id="3rdPartyAppData" On="uninstall" />

but it doesn't seem to notice these entries. Where do I have to place them?
BTW, these directories may or may not exist, depending on whether the user
has other add-ons installed for this 3rd-party software. So I wouldn't
necessarily want the RemoveFolder tag to remove the folder, but to do so
only if my installer had to create the directories. I assume this is the
default behavior, but please let me know if it is not.

Thank you in advance for your help!

-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/installing-files-to-user-s-application-data-folder-tp5377311p5377311.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to