Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Installed application versions 3

Status
Not open for further replies.

cobas

Programmer
Feb 4, 2002
21
GB
I am writing a VB app that requires IIS version 5 or greater installed.

Does anyone know how to code a test for this?

Many thanks
 
Have a look at shows you how to do it with batch files. It might provide some info on which API or registry key informs you what is actually installed.
Does it matter if the IIS service is running, i.e. are you just checking to see if its installed or do you need it installed and the service started?
 
hmckillop

I followed the link you suggested. It's just what I'm looking for. Thanks very much for your post

Cobas
 
And here's a way of seeing the version of any running webserver you have access to. You will need a form with an a textbox and a command button:
[tt]
Option Explicit

Private Sub Command1_Click()
MsgBox GetWebServer(Text1.Text)
End Sub

Private Function GetWebServer(strURL As String) As String
Dim results() As String

On Error GoTo NoServer
With CreateObject("InetCtls.Inet")
.OpenURL strURL
results = Split(.GetHeader(), "Server: ")
GetWebServer = Split(results(1), vbCrLf)(0)
End With
On Error GoTo 0
Exit Function
NoServer:
' Only doing very simple error trap
GetWebServer = "Server not found"
on Error Goto 0
End Function
 
hmckillop / strongm

Thanks I've given you both 'stars'

cobas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top