ahh...
Try this:
!include logiclib.nsh
...
; create button first:
${NSD_CreateButton} 355 170u 7% 12u "Disable"
Pop $R1 ; R1 is the button handle at this point
; now, check registry and disable button if necessary:
ReadRegDWORD $0 HKLM 'Software\Microsoft\.NET Framework Setup\NDP\v2.00.50727' Install
ClearErrors
${Unless} $0 == "Install"
EnableWindow $R1 0
${EndUnless}
...
[continue your code here]
Remember that you have to show your page once you're done creating it (as outlined in the nsDialogs documentation). If you still have problems, then you may want to take some time to review the nsDialogs documentation and look at some of the examples included with NSIS itself.
edit: I changed the ${if} to an ${unless}