<!-- Custom action to set the .NET version -->
<CustomAction Id="SetNetVersion_Cmd" Property="SetNetVersion" Execute="immediate" Return="check" Value="$(var.SetNetVersionCmd)" />
<CustomAction Id="SetNetVersion" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
<!-- Run the action -->
<InstallExecuteSequence>
<Custom Action='SetNetVersion_Cmd' After='InstallFinalize' />
</InstallExecuteSequence>
Вот что показывает журнал MSI:
Action 22:02:57: SetNetVersion_Cmd.
Action start 22:02:57: SetNetVersion_Cmd.
MSI (s) (44:9C) [22:02:57:533]: PROPERTY CHANGE: Adding SetNetVersion property. Its value is '"C:\Windows\\system32\inetsrv\appcmd" set config -section:applicationPools -[name="PoolName"].managedRuntimeVersion:v4.0'.
Action ended 22:02:57: SetNetVersion_Cmd. Return value 1.
Пул существует, но его версия .NET не изменяется.Что я делаю не так?
SetNetVersionCmd:
'"[WindowsFolder]\system32\inetsrv\appcmd" set config -section:applicationPools -[\[]name="PoolName"[\]].managedRuntimeVersion:v4.0'