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
- :
- Re: How to bind IIS WebSite to combobox
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
Jan 08, 2008
03:32 AM
How to bind IIS WebSite to combobox
hi everyone, in my project i want user can select website alreadly in IIS, so i can know rebuild or create it, my question is how to bind website with combobox, anybody can help me?:(
PS. i also want to know the same function of Virtual Directory.:confused:
PS. i also want to know the same function of Virtual Directory.:confused:
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 08, 2008
07:00 AM
First, create a custom action that executes the following code (VBScript)
actions should run in immediate mode
then, create two Properties
WEBSITE and WEBSITES
on a form of your choise, add a combobox, and bind it to the property WEBSITES
(important!)
in your Internet Information Services settings, create a default website, as port number you select something random and in site number enter [WEBSITES]
this is the approach that works for me, I compiled it using different posts on the internet,
please not that I do not guarantee a bullet proof setup using this..
not sure on how to do Virtual directories, but a similar approach might be feasable.
actions should run in immediate mode
DIM strServer, strServerType, strServerMetaType
DIM objService
dim msiView,strProp
Const msiViewModifyInsertTemporary = 7
strServer = "localhost"
strServerType = "Web"
strServerMetaType = "W3SVC"
Set objService = GetObject( "IIS://" & strServer & "/" & strServerMetaType )
set msiView = Database.OpenView("SELECT * from ComboBox")
strProp = "WEBSITES"
DIM objServer, strBindings
r = 0
FOR EACH objServer IN objService
IF objServer.Class = "IIs" & strServerType & "Server" THEN
r = r + 1
AddComboItem msiView,strProp,r,objServer.Name,objServer.ServerComment
END IF
NEXT
msiView.Close
function AddComboItem(msiView,strProp,nIndex,strValue,strText)
dim rec
set rec = Installer.CreateRecord(4)
rec.StringData(1) = strProp
rec.IntegerData(2) = nIndex
rec.StringData(3) = strValue
rec.StringData(4) = strText
msiView.Modify msiViewModifyInsertTemporary,rec
end function
then, create two Properties
WEBSITE and WEBSITES
on a form of your choise, add a combobox, and bind it to the property WEBSITES
(important!)
in your Internet Information Services settings, create a default website, as port number you select something random and in site number enter [WEBSITES]
this is the approach that works for me, I compiled it using different posts on the internet,
please not that I do not guarantee a bullet proof setup using this..
not sure on how to do Virtual directories, but a similar approach might be feasable.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 08, 2008
07:41 PM
Thanx a lot MrSensitive, it's working:D
but there still have a question, when i select one website already exist, the combobox display the site num of this website, i want know how to show Website Name like combobox text is website name and vlaue is web site num~ thanks again.
but there still have a question, when i select one website already exist, the combobox display the site num of this website, i want know how to show Website Name like combobox text is website name and vlaue is web site num~ thanks again.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 09, 2008
02:59 AM
Hi,
i would like to do the same thing but that's doesn't work !!!
I have to create a basic msi project add a custom action vb in store binary table. this custom action is on immediate execution.
On the readytoinstall dialog, i've add a combo box with the property => [WEBSITES].
I have add a button on this dialog with a doAction for execute the custom action when i click on the button.
For Argument i have add the name of the custom action vb and condition is set to 1 !
On property manager i have add this property [WEBSITE] with the value 0.
On internet information service, i have add a web site with the name default web site. For site number i have enter 123 and for site number [WEBSITES]
I build the project and run, when i click on the button on ready to install there is nothing on the combobox !!!!
Something is wrong but if someone can tell me what !?
Thanks for all
Christophe
i would like to do the same thing but that's doesn't work !!!
I have to create a basic msi project add a custom action vb in store binary table. this custom action is on immediate execution.
On the readytoinstall dialog, i've add a combo box with the property => [WEBSITES].
I have add a button on this dialog with a doAction for execute the custom action when i click on the button.
For Argument i have add the name of the custom action vb and condition is set to 1 !
On property manager i have add this property [WEBSITE] with the value 0.
On internet information service, i have add a web site with the name default web site. For site number i have enter 123 and for site number [WEBSITES]
I build the project and run, when i click on the button on ready to install there is nothing on the combobox !!!!
Something is wrong but if someone can tell me what !?
Thanks for all
Christophe
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 09, 2008
07:27 PM
Christophe
you only need one perporty [WebSite] and change the [WebSites] to [WebSites] in vbs, make sure the combobox is bind with [WebSite], set custom action run after SetupCompleteSuccess and before InstallWelcome, this custom is work on my project.
you only need one perporty [WebSite] and change the [WebSites] to [WebSites] in vbs, make sure the combobox is bind with [WebSite], set custom action run after SetupCompleteSuccess and before InstallWelcome, this custom is work on my project.
![](/skins/images/19F9C6DC056868BD0EEB3511534AB4E7/responsive_peak/images/icon_anonymous_message.png)