How to create an MSI package that installs no files and only executes some commands using Wix
- by Sevas
I am trying to create an MSI package that uses the AppCmd application to configure IIS7. It only has to execute some commands that call AppCmd. Some commands need to be called when installing, other commands need to be called when uninstalling.
Here is what I have now:
I have a property that points to AppCmd:
<Property Id="APPCMD" Value="C:\Windows\system32\inetsrv\appcmd.exe" />
I have my custom actions:
<CustomAction Id="UnlockHandlerSection" Return="check" Property="APPCMD" ExeCommand="unlock config /section:system.webServer/handlers" />
I have Custom elements that call the actions:
<InstallExecuteSequence>
<Custom Action="UnlockHandlerSection" After="InstallFiles">NOT Installed AND NOT PATCH</Custom>
<InstallExecuteSequence>
The problem with this is is that the commands are not called when I try to install the resulting MSI package. Could anyone please advise me on what I am doing wrong? Thank you!