I have a setup that installs a system-wide managed-code module in IIS7. I do
this as follows:
<Component Id="modulesConfig"
Guid="{3D0ACDA1-C029-4084-B3F7-51822745A7ED}" Win64="$(var.64bit)">
<util:XmlConfig Id="addMyHandler" Sequence="4"
File="[IISINSTALLDIR]Config\applicationHost.config"
ElementPath="//system.webServer/modules" Name="add" Node="element"
Action="create" On="install" />
<util:XmlConfig Id='add_name' Sequence='5'
File='[IISINSTALLDIR]Config\applicationHost.config'
ElementId='addMyHandler' Name='name' Value='myHandler' />
<util:XmlConfig Id='add_type' Sequence='6'
File='[IISINSTALLDIR]Config\applicationHost.config'
ElementId='addMyHandler' Name='type' Value='MyHandler.Module,
MyHandler, Version=1.0.0.1, Culture=neutral, PublicKeyToken=9a9d230324c99377' />
<util:XmlConfig Id="modulesConfigRemove" Sequence="4"
File="[IISINSTALLDIR]Config\applicationHost.config"
ElementPath="//system.webServer/modules"
VerifyPath="//system.webServer/modules/add[...@name='myHandler'[\]]"
Name="add" Node="element"
Action="delete" On="uninstall" />
</Component>
With the following preprocessor command setting var.64bit:
<?ifdef $(var.ProcessorArchitecture) = x64?>
<?define 64bit=yes?>
<?else?>
<?define 64bit=no?>
<?endif?>
This seems to work just fine in 32-bit, but in 64-bit it fails with the
following error:
Action 14:21:52: ExecXmlConfig.
Error 25541. Failed to open XML file
C:\Windows\system32\inetsrv\Config\applicationHost.config, system error:
-2147024786
I can't figure it out, I made sure I have access to the file in elevated mode
(the elevated prompt comes up), and it works great in 32-bit.
Any ideas? Is there a better way to do this?
Thanks,
Adam
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users