This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- IIS_VERSION Check?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 05, 2007
02:12 PM
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
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
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 05, 2007
06:23 PM
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...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2007
09:03 AM
Yes, it is a web project and I'm also dealing with virtual directories inside of this project.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2007
09:27 AM
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?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2007
10:03 AM
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.
Secondly, my code is being called after the AppSearch gets executed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 06, 2007
04:38 PM
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.)
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.)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 07, 2007
09:50 AM
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!