tags:

views:

145

answers:

1

Is there a way to identify the current version of IIS / using NSIS?

I need a way to add some special behaviour to my installer in case of IIS 7.

+1  A: 

In our NSIS installer, we check the MajorVersion and MinorVersion DWORD values found under "HKLM\SOFTWARE\Microsoft\InetStp". This is the way I found others doing it online.

You could do something like:

    ClearErrors
    ReadRegDWORD $0 HKLM "SOFTWARE\Microsoft\InetStp" "MajorVersion"
    ReadRegDWORD $1 HKLM "SOFTWARE\Microsoft\InetStp" "MinorVersion"
    IfErrors skip

    IntCmp $0 7 0 skip 0

    // do special IIS stuff here

skip:
Chris Karcher