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 Knowledge Base
- :
- Get Site Number For Existing Website.
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Get Site Number For Existing Website.
Get Site Number For Existing Website.
Synopsis
This helpnet article gives instructions on how to have the installer automatically detect the next available site number and use it to install the website.http://helpnet.flexerasoftware.com/installshield22helplib/helplibrary/IISPortSiteNo.htm
However, this will have the installer still attempt to add a new site even if a site with the same name already exists.
Discussion
The following VbScript code can check for an existing website and get the Site Number.Dim objW3SVC, objIisWebSite
Set objW3SVC = GetObject("IIS://localhost/W3SVC")
For Each objIisWebSite In objW3SVC
If objIisWebSite.Class = "IIsWebServer" Then
MsgBox objIisWebSite.Name ' SiteNumber
MsgBox objIisWebSite.ServerComment ' SiteName
if objIisWebSite.ServerComment = Session.Property("SSWEBSITE") then
Property("SSNEXTNEWSITENUMBER")=objIisWebSite.Name
end if
end if
next
The MSI Property SSWEBSITE should be set the site name being checked.
The MSI Property SSNEXTNEWSITENUMBER is where the site number is stored if the existing Website is found.
This vbscript can be called from a vbscript custom action.
No ratings