Loading
IIS_VERSION Check?
I've looked in the InstallShield help which says that the IIS_VERSION property contains the IIS version of the machine you are using.

 

I'm trying to install to both Windows XP and 2003 systems so I need something to check which version of IIS is running.

 

Here's what I have currently where I'm checking the value of IIS_VERSION and outputting it to a text file. This currently returns back nothing for the IIS_VERSION property. Does anybody have an idea why I'm not getting a value back?

 

 

Set iisinfo = GetObject("IIS://localhost/W3SVC/Info")

 

Dim x, versionNumber, a, outputText

 

x = Session.Property("IIS_VERSION")

 

a = Len(x)

 

versionNumber = Right(x, a)

 

Dim objFSO, objFSOText, objFile

 

Dim strDirectory, strFile

 

strFile = "C:\Output.txt"

 

outputText = "x: " & x & " a: " & a & " versionNumber: " & versionNumber

 

' Create the File System Object

 

Set objFSO = CreateObject("Scripting.FileSystemObject")

 

Set objFile = objFSO.CreateTextFile(strFile)

 

objFile.WriteLine(outputText)

 

objFile.Close

  • Community Manager (Flexera Software)

    Does your project contain a virtual directory, or is it a Web project? Either of those has to be true for the system search that populates the IIS_VERSION value to be added to the project...
  • Community Manager (Flexera Software)

    If you look in the System Search view, are the searches that populate IISROOTFOLDER and IIS_VERSION present? Is your code being called from an action that runs after the AppSearch action?
  • I looked in the System Search view and there are searches there that populates both values. I looked in my registry and there is indeed a value of 5 (I'm running on XP currently).

     

    Secondly, my code is being called after the AppSearch gets executed.
  • Community Manager (Flexera Software)

    As a sanity check, if you put

     

    MsgBox "x = " & x

     

    after your Session.Property line, does a value show up? (For example, I'm not sure what your code that calls the Right function is doing, so looking at the original value might be useful.)
    Expand Post
  • Hmm, I put the IIS_VERSION property back as the value for x and ran it again and it seems to be working fine now. Not sure what I was missing in the first place, but thanks!

Loading
IIS_VERSION Check?