Hi,
Since Cosmin's solution opens the command prompt window during installation, I am providing the solution for hidden install of framework as a feature.
1. If you install framework 3.5 under prerequisites, select edit on the prerequisite and under 64 bit Windows untick Server 2008R2 (Install
Conditions -> Launch conditions)
2. In
Search add
New Extended Search and name it
As a
Criteria select
Registry Key exists and add registry key
Code: Select all
HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5
3. In
Custom actions under
Install add a
New Custom Action -> Script Inline.
Source Type should be set to Visual basic script and
Script text should contain the following code:
Code: Select all
const WindowStyleStealth = &H20000000 : set WSO = createobject("WScript.Shell") : WSO.run "%comspec% /c ServerManagerCmd.exe -install NET-Framework-Core", WindowStyleStealth, true
Select
64 - bit script, run in
Synchronous execution, check return code with
Deferred with no impersonation option selected. Under
Execution condition enter the following
Code: Select all
NOT Installed AND VersionNT64 AND ( VersionNT = "601" ) AND (NOT NETFRAMWORK3.5)
As a final note, this only installs core framework features. To install complete framework, replace this
Code: Select all
ServerManagerCmd.exe -install NET-Framework-Core
in
Script text, with the following
Code: Select all
ServerManagerCmd.exe -install NET-Framework
I would also like to thank Cosmin for his support, so that I could come to this solution!
Best Regards,
Rok
FOLLOW US
Get the latest news in Application Packaging