[wix-users] Strange problem with permanent component, folder delete, and upgrade.

rmacfadyen at rmtrack.com rmacfadyen at rmtrack.com
Mon Aug 30 17:20:01 PDT 2021



The authoring looks like:


      <Component Id="Web.config" DiskId="1"
Guid="{59F376F4-A90C-4F21-91E5-847A3308E64D}" Permanent="yes">

        <File Id="Web.config" Name="Web.config"
Source="$(var.WebFilesPath)\Web.config" />



The help on "NeverOverwrite" is confusing: 


If this attribute is set to 'yes', the installer does not install or
reinstall the component if a key path file or a key path registry entry for
the component already exists. The application does register itself as a
client of the component. Use this flag only for components that are being
registered by the Registry table. Do not use this flag for components
registered by the AppId, Class, Extension, ProgId, MIME, and Verb tables.
Values of this type will be either "yes" or "no".


The bit "Use this flag only for. Registry table" and "Do not use . AppId,
Class [etc]" seem to all be about Windows registry items. Does this flag
apply to filesystem items?


BUT. I think you may be on the trail with timestamps. If through the
copy/pasting/renaming going on maybe the web.config file ended up with the
same timestamp as the web.config in the installer and therefore the
installer overwrote it? 


Anyways thanks!!







From: Hoover, Jacob <Jacob.Hoover at greenheck.com> 
Sent: August 25, 2021 4:18 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: rmacfadyen at rmtrack.com
Subject: RE: [wix-users] Strange problem with permanent component, folder
delete, and upgrade.




What's the component authoring loo like for that file?  Is it in its own
component, and is it the key path?  Did you specify NeverOverwrite?


Windows installer doesn't monitor the file system, but at the time you
install the newer MSI, it will compare timestamps (because it's not a binary
w/ version info) to determine if it should lay down a new file.


From: wix-users <wix-users-bounces at lists.wixtoolset.org
<mailto:wix-users-bounces at lists.wixtoolset.org> > On Behalf Of rmacfadyen---
via wix-users
Sent: Wednesday, August 25, 2021 1:31 PM
To: wix-users at lists.wixtoolset.org <mailto:wix-users at lists.wixtoolset.org> 
Cc: rmacfadyen at rmtrack.com <mailto:rmacfadyen at rmtrack.com> 
Subject: [wix-users] Strange problem with permanent component, folder
delete, and upgrade.


Hey all,

I've encountered a very odd problem with my installer. 

Background: The installer is for a webforms application. It installs a
program files folder and a folder full of web stuff in
c:\inetpub\wwwroot\[whatever]. In the [whatever] folder there is a
component, web.config, that is marked Permanent.

Situation: Customer originally installed months ago. Runs the installer for
the new version. Installer detects that it is upgrading and proceeds to do
it's thing. However. the end result is that the permanent component,
web.config, is overwritten with the web.config from the installer. This is
bad because the web.config had been modified and should not have been

I could hardly believe it. My testing guy poked and prodded and has been
successful in reproducing the problem. It appears that if the [whatever]
folder is deleted and a new [whatever] folder created from a backup copy
then on upgrading the [whatever]\web.config file will be overwritten.

So to me it seems like Windows installer is monitoring folders and detecting
that a permanent component folder has been removed? Does that sound like
something Windows installer does?

I'm not looking for a solution (other than a "don't do that" advisory).
Rather I'm looking for any sort of confirmation that Windows Installer is
indeed the culprit.

Thanks very much!


WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/ <http://www.firegiant.com> 

NOTE: This email was received from an external source. Please use caution
when opening links or attachments in the message. 

More information about the wix-users mailing list