Hello, I need your help.

When I uninstall my program, the program is uninstalled OK, but the
Documentation shortcuts and the Utils shortcuts remain in the registry and
in the Start Menu program subfolders.

What is wrong in my wxs (attached below)? I can't find the reason after one
week of testing different options.

Why the  <RemoveFolder Id="Utils" On="uninstall"/> must be below the
<Component ...> instead of below <DirectoryRef Id="Utils"> what is more
logical?

Thanks a lot for your time.



<?xml version='1.0' encoding='windows-1252'?>
<?define ProductVersion = "3.2.0"?>
<?define ProductUpgradeCode = "9640CA85-6906-48E8-9ABB-801DBF37DEDB"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension";>


<Product Name='BGINFO4X for Windows $(var.ProductVersion)' Id='*'
UpgradeCode="$(var.ProductUpgradeCode)" Language='1033' Codepage='1252'
Version='$(var.ProductVersion)' Manufacturer='KZTSoftware'>

    <!-- Main packed declaration -->
    <Package Id='*' Keywords='Installer' Description="BGINFO4X for Windows
$(var.ProductVersion)" Comments='BGINFO4X is copyrighted at
KZTSoftware.com' Manufacturer='KZTSoftware'
    InstallerVersion='100' Languages='1033' Compressed='yes'
SummaryCodepage='1252' InstallScope="perMachine" />

    <Upgrade Id='61997F4A-5C91-48AA-B039-61D1EAAF2B3F'>
        <UpgradeVersion OnlyDetect='yes' Property='SELFFOUND'
Minimum='1.0.0' IncludeMinimum='yes' Maximum='1.0.0' IncludeMaximum='yes' />
        <UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND'
Minimum='1.0.0' IncludeMinimum='no' />
    </Upgrade>
    <CustomAction Id='AlreadyUpdated' Error='[ProductName]  1.0 has already
been updated to 1.0.1 or newer.' />
    <CustomAction Id='NoDowngrade' Error='A later version of [ProductName]
is already installed.' />
    <InstallExecuteSequence>
        <Custom Action='AlreadyUpdated'
After='FindRelatedProducts'>SELFFOUND</Custom>
        <Custom Action='NoDowngrade'
After='FindRelatedProducts'>NEWERFOUND</Custom>
    </InstallExecuteSequence>

    <!-- How data is packed inside the msi -->
    <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM
#1" />
    <Property Id='DiskPrompt' Value="BGINFO4X Installation [1]" />

    <Icon Id="WIX_32x32.ico" SourceFile="WIX_32x32.ico" />
    <Property Id="ARPPRODUCTICON" Value="WIX_32x32.ico"/>
    <Property Id="ARPHELPLINK" Value="
http://sourceforge.net/p/BGINFO4X/wiki/Documentation/"/>
    <Property Id="ARPURLINFOABOUT" Value="http://BGINFO4X.sourceforge.net"/>

    <UIRef Id="WixUI_InstallDir"/>
    <UIRef Id="WixUI_ErrorProgressText"/>
    <WixVariable Id="WixUILicenseRtf" Value="gpl3.rtf" />
    <WixVariable Id="WixUIDialogBmp" Value="WIX_493x312.bmp" />
    <WixVariable Id="WixUIBannerBmp" Value="WIX_493x58.bmp" />
    <WixVariable Id="WixUIExclamationIco" Value="WIX_32x32.ico" />
    <WixVariable Id="WixUIInfoIco" Value="WIX_32x32.ico" />
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR"/>

    <PropertyRef Id="NETFRAMEWORK20"/>
    <Condition Message="This application requires .NET Framework 2.0.
Please install the .NET Framework then run this installer again.">
        <![CDATA[Installed OR NETFRAMEWORK20]]>
    </Condition>

    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value='Launch
BGINFO4X for Windows $(var.ProductVersion)' />
    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX">1</Property>
    <UI>
        <UIRef Id="WixUI_InstallDir" />
        <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction"
        Value="LaunchApplication" >WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and
NOT Installed</Publish>
    </UI>
    <Property Id="WixShellExecTarget" Value="[INSTALLDIR]BGINFO4X for
Windows-hiddenconsole.bat" />
    <CustomAction Id="LaunchApplication" BinaryKey="WixCA"
DllEntry="WixShellExec" Impersonate="yes" />


    <!-- Directory Structure -->
    <Directory Id='TARGETDIR' Name='SourceDir'>
        <Directory Id='ProgramFilesFolder' Name='PFiles'>
            <Directory Id='INSTALLDIR' Name='BGINFO4X for Windows
$(var.ProductVersion)'><Directory Id='BaseDir'></Directory></Directory>
        </Directory>

          <Directory Id="ProgramMenuFolder" >
            <Directory Id="ApplicationProgramsFolder" Name="BGINFO4X for
Windows $(var.ProductVersion)">
                <Directory Id='Documentation' Name="Documentation"/>
                <Directory Id='Utils' Name="Utils"/>
            </Directory>
        </Directory>

        <Directory Id="StartupFolder" Name="StartUp"/>
        <Directory Id="DesktopFolder" Name="Desktop"/>
    </Directory>

    <DirectoryRef Id="Documentation">
        <Component Id="DocumentationShortcuts"
Guid="18FF8E35-35D1-488C-801B-3EA47BB75F0D">
            <util:InternetShortcut Id="WebSite"
                    Name="BGINFO4X WebSite" Type="url"
                    Target="http://BGINFO4X.sourceforge.net"/>
            <util:InternetShortcut Id="OnlineDocumentationShortcut"
                    Name="BGINFO4X Documentation" Type="url"
                    Target="
http://sourceforge.net/p/BGINFO4X/wiki/Documentation/"/>
            <util:InternetShortcut Id="OnlineHelpShortcut"
                    Name="BGINFO4X Help Forum" Type="url"
                    Target="http://sourceforge.net/p/BGINFO4X/discussion/"/>
            <RemoveFolder Id="Documentation" On="uninstall"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="Documentation"
Type="integer" Value="1" KeyPath="yes" />
        </Component>
    </DirectoryRef>

    <DirectoryRef Id="Utils">
        <Component Id="ApplicationShortcutHTML"
Guid="BCD09B03-9EA8-4FAA-B920-C04C95310E4C">
            <Shortcut Id="ApplicationStartMenuShortcutHTML"
                    Name="BGINFO4X - Html Report"

Target="[\%]USERPROFILE[\%]\BGINFO4X\EXPORT\BGINFO4X.html"/>
            <RemoveFolder Id="Utils" On="uninstall"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="Utils" Type="integer"
Value="1" KeyPath="yes" />
        </Component>
        <Component Id="ApplicationShortcutUnix"
Guid="79B66FE6-9DA6-4918-B265-73A7772DA810">
            <Shortcut Id="ApplicationStartMenuShortcutUnix"
                      Name="BGINFO4X - Unix Bash Shell"
Description="BGINFO4X - Unix Bash Shell"
                      Target="[INSTALLDIR]BGINFO4X Bash Shell.bat"
Icon="WIX_32x32.ico"
                      WorkingDirectory="INSTALLDIR"/>

            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X for Windows -
Unix Bash Shell" Type="integer" Value="1" KeyPath="yes" />
        </Component>
        <Component Id="ApplicationShortcutSqliteStudio"
Guid="53D1499E-A8FB-435D-8380-EFC5462B2B62">
            <Shortcut Id="ApplicationStartMenuShortcutSqliteStudio"
                      Name="BGINFO4X - Sqlite Studio" Description="BGINFO4X
- Sqlite Studio"
                      Target="[INSTALLDIR]BGINFO4X Sqlite Studio.bat"
Show="minimized"
                      WorkingDirectory="INSTALLDIR"/>

            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X for Windows -
Sqlite Studio" Type="integer" Value="1" KeyPath="yes" />
        </Component>
        <Component Id="ApplicationShortcut"
Guid="240BFA0F-8BF2-45AB-A1CB-D605D2D99628">
            <Shortcut Id="ApplicationStartMenuShortcut"
                      Name="BGINFO4X for Windows" Description="BGINFO4X for
Windows"
                      Target="[INSTALLDIR]BGINFO4X for Windows.bat"
Icon="WIX_32x32.ico"
                      WorkingDirectory="INSTALLDIR"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X for Windows"
Type="integer" Value="1" KeyPath="yes" />
         </Component>
        <Component Id="ApplicationShortcutHidden"
Guid="C0D08806-B5C4-4212-A780-05164FC7F7F7">
            <Shortcut Id="ApplicationStartMenuShortcutHidden"
                      Name="BGINFO4X for Windows - Hidden Console"
                      Target="[INSTALLDIR]BGINFO4X for
Windows-hiddenconsole.bat" Icon="WIX_32x32.ico" Show="minimized"
                      WorkingDirectory="INSTALLDIR"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X for Windows -
Hidden Console" Type="integer" Value="1" KeyPath="yes" />

        </Component>
    </DirectoryRef>

    <DirectoryRef Id="ApplicationProgramsFolder">
        <Component Id="ApplicationShortcutReload" Guid="*">
            <Shortcut Id="ApplicationStartMenuShortcutReloadConfig"
                  Name="BGINFO4X - Reload Configuration"
Description="BGINFO4X - Reload Configuration" Show="minimized"
                  Target="[INSTALLDIR]BGINFO4X Reload Configuration.bat"
Icon="WIX_32x32.ico"
                  WorkingDirectory="INSTALLDIR"/>

            <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X - Reload
Configuration" Type="integer" Value="1" KeyPath="yes" />
        </Component>
    </DirectoryRef>

    <DirectoryRef Id="StartupFolder">
        <Component Id="StartupShortcut"
Guid="D65DBCE7-DFCF-4F4A-809A-17C01AE68B8A">
            <Shortcut Id="StartupMenuShortcut"
                      Name="BGINFO4X for Windows - Hidden Console"
                      Target="[INSTALLDIR]BGINFO4X for
Windows-hiddenconsole.bat" Icon="WIX_32x32.ico"
                      WorkingDirectory="INSTALLDIR"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X StartupShortcut"
Type="integer" Value="1" KeyPath="yes" />

        </Component>
    </DirectoryRef>
    <DirectoryRef Id="DesktopFolder">
        <Component Id="DesktopShortcut"
Guid="6319062E-F0AE-41AA-9ECC-C5BCFC26FCB3">
            <Shortcut Id="DesktopMenuShortcut"
                       Name="BGINFO4X - Unix Bash Shell"
Description="BGINFO4X - Unix Bash Shell"
                      Target="[INSTALLDIR]BGINFO4X Bash Shell.bat"
Icon="WIX_32x32.ico"
                      WorkingDirectory="INSTALLDIR"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X DesktopShortcut"
Type="integer" Value="1" KeyPath="yes" />
        </Component>
    </DirectoryRef>


    <!-- Add Components to features. Tell WiX to install the files  -->
    <Feature Id="MainApplication" Title="Main Application" Level="1">
        <ComponentGroupRef Id='BGINFO4XGroup' />
        <ComponentRef Id="ApplicationShortcut" />
        <ComponentRef Id="ApplicationShortcutHidden" />
        <ComponentRef Id="ApplicationShortcutReload" />
        <ComponentRef Id="ApplicationShortcutSqliteStudio" />
        <ComponentRef Id="ApplicationShortcutUnix" />
        <ComponentRef Id="DocumentationShortcuts" />
        <ComponentRef Id="ApplicationShortcutHTML" />
        <ComponentRef Id="StartupShortcut" />
        <ComponentRef Id="DesktopShortcut" />
    </Feature>

</Product>
</Wix>
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to