set scriptpath=%~d0%~p0

@ECHO OFF
set regpath=HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup\Windows Presentation Foundation
set regvalue=InstallSuccess
set regdata=1
echo Check for .Net Framework 2.0... 
reg query "%regpath%" /v "%regvalue%" | find /i "%regdata%"
if errorlevel 1 (
      echo Please wait while .Net Framework is installing......
      rem Start /WAIT .\MSFrameWork\dotnetfx3.exe
      Dism /Online /enable-feature /featurename:NetFx3 /All /Source:%scriptpath% /LimitAccess
       rem EXIT /B /0
)

echo .Net Framework 2.0 is alreay installed......

