Hello!

I have a problem with MSI/WiX. I have a program, here it is a
structure of directories:

".\Program Files\PROG\" - directory of program, created by installer
".\Program Files\PROG\DATA\" - directory with data, created only by
program, must be removed by installer when you using "Remove" option
(*** I know that for data there is an APPDATA dir, and its not a good
idea to write data to subdirs of "Program Files", but this program is
for system administrators)

I have a following problem. I wrote an xml for WiX, that removes
orphaned files in "DATA" directory, also it removes this folder too.
But, as I think, removing process of these files and "DATA" directory
starting AFTER msi-installer trying remove program's directory.
Summary: directory of the progem wasn't removed, because of
subdirectory "DATA" was exist. Subdirectory "DATA" was removed later
by my code. But noone will try to remove program's directory after
this. How to change (and need?) order of removing? I need to remove
orphaned files BEFORE msi-installer tries to remove files and
directories that was created by it before.

Sample of code:
=======================================================================
<Directory Id="TARGETDIR" Name="SourceDir">
  <?include $(var.COMMONDIR)\toolkit.wxi?>
  <Directory Id="ProgramMenuFolder" Name="PMenu">
    <Directory Id="ProgramsCompanyName" Name="$(var.COMPANY_DIR_SHORT)" 
LongName="$(var.COMPANY_DIR)" />
  </Directory>
  <Directory Id="ProgramFilesFolder" Name="PFiles">
    <Directory Id="CompanyDir" Name="$(var.COMPANY_DIR_SHORT)" 
LongName="$(var.COMPANY_DIR)">
      <Directory Id="INSTALLDIR" Name="$(var.PROG_PROG_DIR)">
        <?include $(var.COMMONDIR)\ms_libs1.wxi?>
        <Component Id="PCComponent" Guid="!GUID1!" DiskId="1">
          <File Id="prog.exe" Name="prog.exe" Source="prog.exe" Vital="yes">
            <Shortcut Id="PROG_ShortCut" Directory="ProgramsCompanyName" 
Name="$(var.PROG_VSHORT)" LongName="$(var.PROG_LNK)" 
Description="$(var.PROG_LNK_DESC)" WorkingDirectory="TARGETDIR" />
          </File>
          <File Id="prog_gui.dll" Name="prog_gui.dll" Source="prog_gui.dll" 
Vital="yes" />
          <File Id="prog_krn.dll" Name="prog_krn.dll" Source="prog_krn.dll" 
Vital="yes" />
        </Component>

        <Directory Id="DataDir" Name="DATA">
          <Component Id="RemoveConfigs" Guid="!GUID2!">
            <RemoveFile Id="progdata.bin" Name="progdata.bin" On="uninstall" />
            <RemoveFolder Id="DataDir" On="uninstall" />
          </Component>
        </Directory> <!-- DataDir -->

      </Directory>
    </Directory>
  </Directory>
</Directory>

<Feature Id="PCFeature" Title="$(var.PROG_SHORT)" Description="This is a 
feature description" Level="1" ConfigurableDirectory="INSTALLDIR">
  <ComponentRef Id="PCComponent" />
  <ComponentRef Id="Toolkit" />
</Feature>

<Feature Id="RemoveConfigsFeature" Title="Remove config files" Level="1" 
Display="hidden">
  <ComponentRef Id="RemoveConfigs" />
</Feature>[/CODE]
=======================================================================

Also I tried to add this:

=======================================================================
<InstallExecuteSequence>
    <RemoveFiles />
    <RemoveFolders />
</InstallExecuteSequence>
=======================================================================

Not helped to me. :(

After removing program, I have an empty directories:
".\Program Files\Company Name\PROG\"

P.S. Is it possible to post here a full debug log of installation? (About
     80kb in plaintext, or 8kb in archive - as attach?).

-- 
Best regards,
 Andrey                          mailto:[EMAIL PROTECTED]


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to