4
<!-- 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>
這裏是微星日誌顯示:設置.NET版本不起作用
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.
池確實存在,但its.NET版本不會更改。我究竟做錯了什麼?
的SetNetVersionCmd是:
'"[WindowsFolder]\system32\inetsrv\appcmd" set config -section:applicationPools -[\[]name="PoolName"[\]].managedRuntimeVersion:v4.0'