Question

The last phase of the installer fails with this message:

Installation Incomplete

The installer was interrupted before [project] could be installed. You need to restart the installer to try again.

Running msiexec /i installer.msi /l*vx setup.log shows the following entries in the setup log:

INFO   : [...] [ApplyWebFolderProperties]: Getting web folder property token...
INFO   : [...] [ApplyWebFolderProperties]: Token is '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'.
INFO   : [...] [ApplyWebFolderProperties]: Getting METADATA_HANDLE for the directory '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'.
ERROR  : [...] [ApplyWebFolderProperties]: FAILED:  -2147024893
ERROR  : [...] [ApplyWebFolderProperties]: FAILED:  -2147024893
ERROR  : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3'
ERROR  : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3'
INFO   : [...] [ApplyWebFolderProperties]: Custom Action completed with return code: '3'

The same web application had no problems being installed with a web setup project before. The issue started after upgrading the web application from .NET 3.5 SP1 to .NET 4.0.

Was it helpful?

Solution

This blog entry points out the issue:

Which got me started thinking, I have a subfolder named filters. Changing nothing else but renaming the filters subfolder made it finish properly. I'm assuming you might have the same problems with folders named apppools, info, or 1 as well.

(Emphasis mine)

Unfortunately, Filters is a hard-coded folder name in Dynamic Data. If you look at FilterFactory, there doesn't appear to be any way to override that value, seeing as how the FilterFactory property of MetaModel is not marked virtual. If we can't change the folder name, then we have to look at fixing the installer...

The installer error is being raised by the ApplyWebFolderProperties custom action. That action isn't built-in to Windows Installer—it's added by the Web Setup Project. That's helpful, because it means we can remove it with WiRunSQL.vbs:

cscript WiRunSQL.vbs installer.msi "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'" 

Note that the actual name of ApplyWebFolderProperties is WEBCA_ApplyWebFolderProperties. Seeing as how the action doesn't appear to be documented anywhere, caveat emptor. It doesn't appear to be too terribly important though.

To automate the workaround, you could add the command to the setup project's PostBuildEvent like so:

cscript.exe "$(ProjectDir)..\WiRunSQL.vbs" "$(BuiltOuputPath)" "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'"

If anyone knows a better way to install a folder named Filters, I'd love to hear it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top