I want to enable .net3.5 in nsis installer in windows 2012. I used next code:
nsExec::ExecToStack 'cmd /c %windir%\system32\dism.exe /Online /Enable-Feature /FeatureName:NetFx3 /All'
But it return error 11.enter image description here
my dism log file: enter image description here
I run it on virtual machine, where I have only one user - administrator. If I run this command directly in cmd - everything ok.
It tells you what the problem is. It can't use the 32-bit version for whatever reason.
!include LogicLib.nsh
!include x64.nsh
Section
${If} ${IsWow64}
StrCpy $0 $windir\sysnative
${Else}
StrCpy $0 $sysdir
${EndIf}
nsExec::ExecToStack 'cmd /c $0\dism.exe /Online ......'
Pop ...
Pop ...
SectionEnd