Hello again,

Is it possible that uninstalling my program on Windows 2008 R2 fails
removing the shortcuts, but uninstalling it on W7 works well (all the
program and shortcuts are removed) ?

This is my case.... It is crazy, but true.

Thanks a lot for your time.

I attach the code, perhaps here is the clue:

<?xml version='1.0' encoding='windows-1252'?>
<?define ProductVersion = "3.0.8.1"?>
<?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='Foobar 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>

    <!--
http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/run_program_after_install.html-->
    <UI>
        <UIRef Id="WixUI_InstallDir" />
        <Publish Dialog="ExitDialog" Control="Finish" Event="DoAction"
        Value="LaunchApplication" >WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and
NOT Installed</Publish>
    </UI>
    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX">1</Property>
    <Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value='Launch
BGINFO4X for Windows $(var.ProductVersion)' />
    <Property Id="WixShellExecTarget" Value="[INSTALLDIR]BGINFO4X for
Windows-hiddenconsole.bat" />
    <CustomAction Id="LaunchApplication" BinaryKey="WixCA"
DllEntry="WixShellExec" Impersonate="no" />


    <!-- 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"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="Utils" Type="integer"
Value="1" KeyPath="yes" />
            <RemoveFolder Id="Utils" On="uninstall"/>
        </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]BGBINARIES\sqlite\sqlitestudio.exe"

WorkingDirectory="INSTALLDIR"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X for Windows -
Sqlite Studio" Type="integer" Value="1" KeyPath="yes" />
        </Component>
    </DirectoryRef>

    <DirectoryRef Id="ApplicationProgramsFolder">
        <Component Id="ApplicationShortcutReloadConfig"
Guid="76a819c3-1da3-40d7-87f7-3f450c0d927f">
            <Shortcut Id="ApplicationStartMenuShortcutReloadConfig"
                      Name="BGINFO4X - Reload Configuration"
Description="BGINFO4X - Reload Configuration"
                      Target="[INSTALLDIR]BGINFO4X Reload
Configuration.bat" Icon="WIX_32x32.ico"

WorkingDirectory="INSTALLDIR"/>
            <RegistryValue Root="HKMU"
Key="Software\[Manufacturer]\[ProductName]" Name="BGINFO4X for Windows -
Reload Configuration" 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"/>
            <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
            <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"
                      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="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 feactures. 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="ApplicationShortcutSqliteStudio" />
        <ComponentRef Id="ApplicationShortcutUnix" />
        <ComponentRef Id="DocumentationShortcuts" />
        <ComponentRef Id="ApplicationShortcutHTML" />
        <ComponentRef Id="ApplicationShortcutReloadConfig" />
        <ComponentRef Id="StartupShortcut" />
        <ComponentRef Id="DesktopShortcut" />
    </Feature>

</Product>
</Wix>





---------- Forwarded message ----------
From: BGINFO4X <bginf...@kztsoftware.com>
Date: 2013/10/17
Subject: Re: [WiX-users] RemoveFolder question
To: "General discussion about the WiX toolset." <
wix-users@lists.sourceforge.net>



Hello,

Thanks a lot for the answer.

My problem seems related to HKMU. It seams that using it, causes the
shortcuts not been removed under uninstallation of the program. I'm
investigating....

If someone has a key, I will be very grateful.

Regards.


2013/10/17 Blair Murri <os...@live.com>

> Folders are only removed if they are empty at the time the action is run.
> Otherwise they are left behind.
>
> Shortcuts are removed when the component creating them is uninstalled.
>
> RemoveFolder is only "really" required for folders that don't have
> components "assigned" to them (as often happens with folders used with
> shortcuts), since a folder associated with a component will be erased if
> empty once all components using that folder (or any of its subfolders) have
> been removed.
>
> A component is an "atomic" unit of installation. All of a components
> resources are all either written or erased in the same transaction (with
> some limited exceptions).
>
> A feature is the "externally selectable" unit of installation. All
> components in an installed feature will be installed (or left installed),
> and all components with no remaining installed features are removed
> whenever any features have been removed.
>
> > Date: Thu, 17 Oct 2013 13:50:54 +0200
> > From: bginf...@kztsoftware.com
> > To: wix-users@lists.sourceforge.net
> > Subject: Re: [WiX-users] RemoveFolder question
> >
> > Hello again,
> >
> > But, using RemoveFolder inside the component, does it mean that all the
> > shortcuts, if there are more than one , will be removed when uninstalled?
> > In other words, they will be treated as a "group" of uninstall?
> >
> > Thanks a lot for your time.
> >
> >
> >
> >
> > 2013/10/17 Blair Murri <os...@live.com>
> >
> > > Actions (such as RemoveFolder) must be associated with a single
> component
> > > because components are what are installed or removed. If RemoveFolder
> were
> > > associated with the directory itself, it would require a Component
> > > attribute in order to associate the action with the controlling
> component,
> > > and that would mean that all the resources and actions of a component
> would
> > > no longer be (mostly) together.
> > >
> > > > Date: Thu, 17 Oct 2013 09:43:56 +0200
> > > > From: bginf...@kztsoftware.com
> > > > To: wix-users@lists.sourceforge.net
> > > > Subject: [WiX-users] RemoveFolder question
> > > >
> > > > Hello,
> > > >
> > > > I have a question regarding RemoveFolder.
> > > >
> > > > In the following snippet, the the sentence:  <RemoveFolder Id="Utils"
> > > > On="uninstall"/> is below component at the samelevel of Shortcut?
> > > >
> > > > Why is not at the same level of <DirectoryRef Id="Utils"> what has
> more
> > > > sense in my opinion?
> > > >
> > > > Thanks a lot.
> > > >
> > > >
> > > > <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>
> > > >
> > >
> ------------------------------------------------------------------------------
> > > > 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=60135031&iu=/4140/ostg.clktrk
> > > > _______________________________________________
> > > > WiX-users mailing list
> > > > WiX-users@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >
> > >
> > >
> ------------------------------------------------------------------------------
> > > 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=60135031&iu=/4140/ostg.clktrk
> > > _______________________________________________
> > > WiX-users mailing list
> > > WiX-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wix-users
> > >
> >
> ------------------------------------------------------------------------------
> > 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=60135031&iu=/4140/ostg.clktrk
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------------------------------------------------------
> 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=60135031&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
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=60135031&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