Archive: NSIS 2.46 IsDotNETInstalled not working in XP SP3


NSIS 2.46 IsDotNETInstalled not working in XP SP3
I am a newbie to NSIS and couldn't find a solution for the following problem other than downloading and using DotNetVer.nsh.

I used the IsDotNETInstalled script in an installer which works fine on Win7. However, in XP SP3 the script insists that DotNET is not installed on the machine although I have installed the required version of DotNET

Is the system call not working in XP SP3 or do I miss something else?

The script I am refering to is from appendix C.2 in the help file.

; IsDotNETInstalled
;
; Based on GetDotNETVersion
; http://nsis.sourceforge.net/Get_.NET_Version
;
; Usage:
; Call IsDotNETInstalled
; Pop $0
; StrCmp $0 1 found.NETFramework no.NETFramework

Function IsDotNETInstalled
Push $0
Push $1

StrCpy $0 1
System::Call "mscoree::GetCORVersion(w, i ${NSIS_MAX_STRLEN}, *i) i .r1"
StrCmp $1 0 +2
StrCpy $0 0

Pop $1
Exch $0
FunctionEnd


I would instead enumerate the keys under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP if you want to detect the version.

Stu