Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

Getting IIS Version of Machine

Hello All,

I'm trying to have the install determine if IIS 7 or greater is installed. Is there a simple way to get this information? I see that HKLM\SOFTWARE\Microsoft\InetStp contains a string called VersionString but contains "Version 7.5". Is there a way to get that 7.5 value from to do a version check?
Labels (1)
0 Kudos
3 Replies
Level 7

The version of IIS is always tied to the version of the OS.

So the simplest way is to use the flags in SYSINFO which is the way I do it.

if you want to fish that string out of the registry, then use StrFind and StrSub to get the numerical portion of the string. Then use StrGetTokens with "." to get a szMajor and szMinor. And use StrToNum to convert those to numbers.

I would use SYSINFO.
0 Kudos
Level 5

Thanks, Phil!
0 Kudos
Level 10

Also, there is a "MajorVersion" and a "MinorVersion" value under that same key.

You could just have two system searches assign those values to the properties [IIS_VERSION_MAJOR] and [IIS_VERSION_MINOR]. Then create a a "Set a property" CA to set your internal [IIS_VERSION_STR] property to "[IIS_VERSION_MAJOR].[IIS_VERSION_MINOR]"
0 Kudos