[wix-users] WIX Parent folder not getting removed during uninstallation though no files are left

Mayooran Macilamany mayooran99 at gmail.com
Thu Jul 7 22:00:19 PDT 2016


Is it possible to delete the folder after a directory check? Like I have my
first MSI's path set in the following way.

  <Property Id="UPDATERSERVICEFOLDER">
      <RegistrySearch
Key="SYSTEM\CurrentControlSet\Services\UpdaterService\Parameters"
Root="HKLM" Type="raw" Id="UpdateDirectoryRegistrySearch"
Name="UpdaterServicePath" />
    </Property>

So is it possible to do RemoveFolderEx if only the above path is empty? If
so, can you provide an example?

On Fri, Jul 8, 2016 at 8:31 AM, John Cooper <JoCooper at jackhenry.com> wrote:

> Yes, it's rather unmerciful.
>
> --
> John Merryweather Cooper
> Senior Software Engineer | Integration Development Group | Enterprise
> Notification Service
> Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 |
> JoCooper at jackhenry.com
>
>
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Mayooran Macilamany
> Sent: Thursday, July 7, 2016 9:59 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] WIX Parent folder not getting removed during
> uninstallation though no files are left
>
> The e-mail below is from an external source.  Please do not open
> attachments or click links from an unknown or suspicious origin.
>
> There'll be an issue with using RemoveFolderEx if I uninstall only the 2nd
> MSI and leave the 1st MSI. Then it will delete the 1st MSI folders as well
> right? :(
>
> On Fri, Jul 8, 2016 at 8:27 AM, John Cooper <JoCooper at jackhenry.com>
> wrote:
>
> > Looks like timing to me.  You can use RemoveFolderEx to really blow
> > things away, but be careful how you select the folder and initialize
> > the property.  You can decapitate a workstation quickly in this manner.
> >
> > Left behind folders aren't usually worth the effort.  Files are
> > another matter.
> >
> > --
> > John Merryweather Cooper
> > Senior Software Engineer | Integration Development Group | Enterprise
> > Notification Service Jack Henry & Associates, Inc.® | Lenexa, KS
> > 66214 | Ext:  431050 | JoCooper at jackhenry.com
> >
> >
> >
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> > Behalf Of Mayooran Macilamany
> > Sent: Thursday, July 7, 2016 9:53 PM
> > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > Subject: Re: [wix-users] WIX Parent folder not getting removed during
> > uninstallation though no files are left
> >
> > The e-mail below is from an external source.  Please do not open
> > attachments or click links from an unknown or suspicious origin.
> >
> > INSTALLLOCATION is set to C drive("C:\"). I have two MSIs inside this
> > bundle. First MSI has the following structure defined.
> >
> > <Directory Id="TARGETDIR" Name="SourceDir">
> >       <Directory Id="INSTALLLOCATION">
> >         <Directory Id="TestInstallDir" Name="Test2.0">
> >           <Directory Id="UPDATESDIR" Name="Updates">
> >             <Component Id="CreateUpdateFolder"
> > Guid="4987B101-283D-4F37-8A29-AAD6A764BE23" Win64="no">
> >               <CreateFolder />
> >             </Component>
> >           </Directory>
> >           <Directory Id="SERVERDIR" Name="UpdaterService">
> >           <Component .................</Component> </Directory>
> >         </Directory>
> >       </Directory>
> >     </Directory>
> >
> > Second MSI has the following directory structure defined.
> >
> > <Directory Id="TARGETDIR" Name="SourceDir">
> >       <Directory Id="INSTALLLOCATION">
> >         <Directory Id="MosquittoInstallDir" Name="Test2.0">
> >           <Directory Id="MyProgramDir" Name="Mosquitto" />
> >         </Directory>
> >       </Directory>
> >     </Directory>
> >
> > Both those MSIs are installed in the same directory. Do you see any
> > issues here?
> >
> >    -  When I uninstall the 2nd MSI first and then run an uninstall on the
> >    1st MSI, 1st MSI does delete all folders and do a clean uninstall.
> >    - But when uninstall the 1st MSI second and then run an uninstall on
> the
> >    2nd MSI, 2nd MSI doesn't delete that Test2.0 folders. But there are
> > files
> >    or services left undeleted. Even the MSI is removed from Programs and
> >    Features. Its just that the Test2.0 folder remain in this scenario.
> >
> >    Any help would be much appreciated. And I checked the log files.
> Nothing
> >    abnormal there. Both the scenarios I mentioned have the same logs.
> >
> >
> > On Fri, Jul 8, 2016 at 8:02 AM, John Cooper <JoCooper at jackhenry.com>
> > wrote:
> >
> > > The MSI log will usually tell you.  The most common cause is a
> > > contained file that can't be deleted (usually because it is running).
> > > Also, deletes can be funny.  The file system tends to cache them and
> > > files that should be gone may live on for a few more seconds.
> > > Finally, files in AppPools tend to get randomly locked by IIS.
> > >
> > > --
> > > John Merryweather Cooper
> > > Senior Software Engineer | Integration Development Group |
> > > Enterprise Notification Service Jack Henry & Associates, Inc.® |
> > > Lenexa, KS
> > > 66214 | Ext:  431050 | JoCooper at jackhenry.com
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> > > Behalf Of Mayooran Macilamany
> > > Sent: Thursday, July 7, 2016 9:26 PM
> > > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > > Subject: [wix-users] WIX Parent folder not getting removed during
> > > uninstallation though no files are left
> > >
> > > The e-mail below is from an external source.  Please do not open
> > > attachments or click links from an unknown or suspicious origin.
> > >
> > > I have this MSI which is included in my burn bootstrap EXE. When I
> > > uninstall this MSI, and when there are no other MSIs left installed,
> > > uninstalling this MSI wouldn't remove the parent installation folder
> > > (testInstallDir). Below is my wix file.
> > >
> > > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
> > >     <Product Id="*" Name="MosquittoInstaller" Language="1033"
> > > Version="3.0.7.0" Manufacturer="Zone24x7"
> > > UpgradeCode="b2cb73e9-bce8-463f-986d-b3f8f13283dd">
> > >     <Package InstallerVersion="200" Compressed="yes"
> > > InstallScope="perMachine" Platform="x64"/>
> > >
> > >     <MajorUpgrade   DowngradeErrorMessage="A newer version of
> > [ProductName]
> > > is already installed." Schedule="afterInstallInitialize"/>
> > >
> > >     <MediaTemplate EmbedCab="yes"/>
> > >
> > >         <Feature Id="ProductFeature" Title="MosquittoInstaller"
> > Level="1">
> > >       <ComponentGroupRef Id="MosquittoFilesGroup"/>
> > >         </Feature>
> > >     </Product>
> > >
> > >   <Fragment>
> > >
> > >     <Directory Id="TARGETDIR" Name="SourceDir">
> > >       <Directory Id="INSTALLLOCATION">
> > >         <Directory Id="testInstallDir" Name="test2.0">
> > >           <Directory Id="MyProgramDir" Name="Mosquitto" />
> > >         </Directory>
> > >       </Directory>
> > >     </Directory>
> > >     <CustomAction Id='RunMosquitto'
> > >  FileKey="fil7D28AEF774656849395A2FA20A5C963D"  Execute="deferred"
> > > ExeCommand='-v' Return="asyncNoWait" HideTarget="no" Impersonate="no"/>
> > >     </Fragment>
> > >
> > >
> > >   <Fragment>
> > >
> > >     <DirectoryRef Id="MyProgramDir">
> > >       <Directory Id="dirC8FCCB6AC509A125EE3B37CC7E907774" Name="devel"
> />
> > >     </DirectoryRef>
> > >   </Fragment>
> > >   <Fragment>
> > >     <ComponentGroup Id="MosquittoFilesGroup">
> > >       <Component Id="cmp4D47D22EE0C10F2FE658B4D343E1153F"
> > > Directory="MyProgramDir" Guid="5458BA33-9B08-46E1-8EE7-DE516F2FEF64">
> > >         <File Id="filFC4C205CAB822D245B62422765716A32" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/aclfile.example" />
> > >       </Component>
> > >       <Component Id="cmp3245A363F29E5F92EEFB67D8F4A466FD"
> > > Directory="MyProgramDir" Guid="1ED7F2BD-692C-4C96-8CF5-C2064B64BF8D">
> > >         <File Id="filB660EA30BBEBA21E457F2F3CA4811CC9" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/ChangeLog.txt" />
> > >       </Component>
> > >       <Component Id="cmpA2A091D2A61C720ED9AE76DAF2674BE6"
> > > Directory="MyProgramDir" Guid="5F780D6F-F8BB-4BF6-84F6-EF8613404775">
> > >         <File Id="fil83340F4F2CEADCD75C02CB23AEE43E5B" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/edl-v10" />
> > >       </Component>
> > >       <Component Id="cmp6F9F08890072C152F5FADAD0D513493C"
> > > Directory="MyProgramDir" Guid="BE80EDA6-28FC-4C0D-8BAC-94FA8AE5BB94">
> > >         <File Id="fil60C98E7B75120C739F33F0C7ABF52318" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/epl-v10" />
> > >       </Component>
> > >       <Component Id="cmpB04A2DC39867DD744B3591AC2AFB49BC"
> > > Directory="MyProgramDir" Guid="236F6263-DCDB-42BC-8DA3-8D23189EC331">
> > >         <File Id="fil93F56A00DDA348881B22245DADDB4F5A" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/libeay32.dll" />
> > >       </Component>
> > >       <Component Id="cmp3FA55FD836AD7B4095DAFD837A100110"
> > > Directory="MyProgramDir" Guid="7ED4C914-E66F-4F39-AC4E-A24123BF394C">
> > >         <File Id="fil711449631134E31C4C38DCA6C4FCD922" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/libssl32.dll" />
> > >       </Component>
> > >       <Component Id="cmpBA00B50D8224C040011EC424B900FE43"
> > > Directory="MyProgramDir" Guid="EF6C19F7-CCC3-4C61-B5B8-DE01A0C6D55E">
> > >         <File Id="filA995207A6EF3FF0B4A1912B4627C6A9E" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquitto.conf" />
> > >       </Component>
> > >       <Component Id="cmp4587500C7F4126281D74E67979861A5F"
> > > Directory="MyProgramDir" Guid="E81C33BB-226C-40F2-AE05-6F0EDFEDEA00">
> > >         <File Id="filF89C2DB7028E205E7170A35A8F9520E6" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquitto.dll" />
> > >       </Component>
> > >       <Component Id="cmp59455E1C37B7879C4BC250DE3D60A2AD"
> > > Directory="MyProgramDir" Guid="179B4F4C-912B-4CA1-8F08-5E1B4ADFFD8B">
> > >         <File Id="fil7D28AEF774656849395A2FA20A5C963D" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquitto.exe" />
> > >       </Component>
> > >       <Component Id="cmpFC2AA06F4719D34513B7E5E9EB230B41"
> > > Directory="MyProgramDir" Guid="C9CD68F9-77B1-481B-91ED-21AC8A84C4D7">
> > >         <File Id="fil217773E50C3CCD997EE125E6B0195649" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquittopp.dll" />
> > >       </Component>
> > >       <Component Id="cmp783743C36FE8E1154B0AE9E72AC7D575"
> > > Directory="MyProgramDir" Guid="B5717FA1-FE2D-4617-814E-4492EA4D8807">
> > >         <File Id="filCB4D3062E6881D66561E91BD301B39EC" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquitto_passwd.exe" />
> > >       </Component>
> > >       <Component Id="cmpB524C33DDFC8EBC62B98F9EBFC7807D0"
> > > Directory="MyProgramDir" Guid="68E7A8B3-DC15-404F-98D1-20487419D254">
> > >         <File Id="fil5F8821D626DC542D506A561E82B226A6" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquitto_pub.exe" />
> > >       </Component>
> > >       <Component Id="cmp3F0A99A6FCDA4B694FD5CFAFDC8A80CF"
> > > Directory="MyProgramDir" Guid="7B83878B-3F39-4FFA-8FDC-FDFA88E882A5">
> > >         <File Id="fil4C12390E7E7C75828D70CEBED7733FCE" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/mosquitto_sub.exe" />
> > >       </Component>
> > >       <Component Id="cmpEA7CE0C91970F57073BB84F8319AB6E9"
> > > Directory="MyProgramDir" Guid="34F20F13-0533-4029-87BE-C248FEBC8BC6">
> > >         <File Id="fil431A1BF1C3B5AC45CE630487A7C4F945" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/pthreadVC2.dll" />
> > >       </Component>
> > >       <Component Id="cmp7501765F72B0586A968FAC0B19C630D3"
> > > Directory="MyProgramDir" Guid="4A041354-E31D-4074-83EA-5EB162E9088F">
> > >         <File Id="fil542FD8A849709E85C839FE825E8F7381" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/pwfile.example" />
> > >       </Component>
> > >       <Component Id="cmp9AA04B6F826A4FBEDDADF82E79A761E1"
> > > Directory="MyProgramDir" Guid="B48E76CB-C1A4-4E33-8D1C-93F17CF02CEE">
> > >         <File Id="fil9A73011E316138ECF5FA538F5FFA4E65" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/readme-windows.txt" />
> > >       </Component>
> > >       <Component Id="cmp32A4C8B2CEA9C2B249897CE3C6B247C6"
> > > Directory="MyProgramDir" Guid="584E5D69-990B-4CA7-808E-B0CB16061501">
> > >         <File Id="fil5ED5D6BCA1089DC259C7CBA92488771F" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/readme.txt" />
> > >       </Component>
> > >       <Component Id="cmpC98F4A8F1680E1A63542439212B11AE5"
> > > Directory="MyProgramDir" Guid="6B20C0FB-1EF6-47FA-8CF7-6670388E1EE4">
> > >         <File Id="fil85C65E95EE6846B0F10A532F68143610" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/ssleay32.dll" />
> > >       </Component>
> > >       <Component Id="cmp077EB2DAE856A91792B2F5D25E1657B1"
> > > Directory="MyProgramDir" Guid="380D7E34-F52D-495B-AD44-98496DA86C39">
> > >         <File Id="fil2C766C617C17E139FD0C4383EA2836C2" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/Uninstall.exe" />
> > >       </Component>
> > >       <Component Id="cmp75F7F5A733463114C1AE70CEE007EF5B"
> > > Directory="MyProgramDir" Guid="87C8326B-F7BE-48F4-B8E6-3C328EE3699B">
> > >         <File Id="fil6EFD0D9154A77F9F83AD40E108ABC645" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/websockets.dll" />
> > >       </Component>
> > >       <Component Id="cmpED679856D0F7640ABA659DEB9A01EB0C"
> > > Directory="dirC8FCCB6AC509A125EE3B37CC7E907774"
> > > Guid="B576C2B4-4157-469C-86E2-B869214CC64A">
> > >         <File Id="fil2AC1DBC8C2D9F23E430E4C762DCDE74D" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/devel/mosquitto.h" />
> > >       </Component>
> > >       <Component Id="cmp6E8EC27B07C11656CE96CA872FF39F60"
> > > Directory="dirC8FCCB6AC509A125EE3B37CC7E907774"
> > > Guid="78387CDF-FE90-464A-8D3F-BDD42B89C26C">
> > >         <File Id="filEEC89BDE9E29C6E182307F4C6826890A" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/devel/mosquitto.lib" />
> > >       </Component>
> > >       <Component Id="cmp85BF1685089A4DC262B71CEDC73FA6B3"
> > > Directory="dirC8FCCB6AC509A125EE3B37CC7E907774"
> > > Guid="F434B6D5-8A93-43CF-AC26-DE89F52E5A7E">
> > >         <File Id="fil7F5D72039158A30AF8EAA068868BBEF6" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/devel/mosquittopp.h" />
> > >       </Component>
> > >       <Component Id="cmp8D747BA62B3F712D6A73536CB1C1EA26"
> > > Directory="dirC8FCCB6AC509A125EE3B37CC7E907774"
> > > Guid="BBF1DD11-F7C9-4823-ADC4-B31657B05ECF">
> > >         <File Id="filA474F6FBE224F895B1554D05DE2F419D" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/devel/mosquittopp.lib" />
> > >       </Component>
> > >       <Component Id="cmpB2DF497560B4E99936D5598EE54D381B"
> > > Directory="dirC8FCCB6AC509A125EE3B37CC7E907774"
> > > Guid="B0A4C898-AC74-4329-A88E-9321381B0EB9">
> > >         <File Id="fil0F36E85111041DA1F5ABEFF409812AFA" KeyPath="yes"
> > > Source="../../../Setups/mosquitto/mosquitto/devel/mosquitto_plugin.h"
> />
> > >       </Component>
> > >     </ComponentGroup>
> > >   </Fragment>
> > > </Wix>
> > >
> > > What am I doing wrong here? There are no files left. Just the empty
> > > test2.0 folder remains. Please advice.
> > >
> > > ____________________________________________________________________
> > > WiX Toolset Users Mailing List provided by FireGiant
> > > http://www.firegiant.com/
> > >
> > > NOTICE: This electronic mail message and any files transmitted with
> > > it are intended exclusively for the individual or entity to which it
> > > is addressed. The message, together with any attachment, may contain
> > > confidential and/or privileged information.
> > > Any unauthorized review, use, printing, saving, copying, disclosure
> > > or distribution is strictly prohibited. If you have received this
> > > message in error, please immediately advise the sender by reply
> > > email and delete all copies.
> > >
> > >
> > > ____________________________________________________________________
> > > WiX Toolset Users Mailing List provided by FireGiant
> > > http://www.firegiant.com/
> > >
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> > NOTICE: This electronic mail message and any files transmitted with it
> > are intended exclusively for the individual or entity to which it is
> > addressed. The message, together with any attachment, may contain
> > confidential and/or privileged information.
> > Any unauthorized review, use, printing, saving, copying, disclosure or
> > distribution is strictly prohibited. If you have received this message
> > in error, please immediately advise the sender by reply email and
> > delete all copies.
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
> NOTICE: This electronic mail message and any files transmitted with it are
> intended
> exclusively for the individual or entity to which it is addressed. The
> message,
> together with any attachment, may contain confidential and/or privileged
> information.
> Any unauthorized review, use, printing, saving, copying, disclosure or
> distribution
> is strictly prohibited. If you have received this message in error, please
> immediately advise the sender by reply email and delete all copies.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list