Great to have the Wix-users list back

John, here is a script function sample. What it does is just querying
web sites and pulling the result output into a property named
"WebSitesList". If you want them to be displayed in the combo, the
function will be a bit bigger:
QUOTE
Function GetSites()
Dim strRslt: strRslt = ""
Dim locatorObj: Set locatorObj = CreateObject("WbemScripting.SWbemLocator")
Dim objProvider: Set objProvider = locatorObj.ConnectServer("localhost", 
"root/MicrosoftIISv2")
Dim objServersCollection: Set objServersCollection = 
objProvider.ExecQuery("SELECT Name, ServerComment FROM IIsWebServerSetting", 
"WQL",&H30)
Dim oServer
For Each oServer In objServersCollection
    strRslt = strRslt &  oServer.Name & Chr(9) & oServer.ServerComment & vbCrLf
Next
Session.Property("WebSitesList") = strRslt
Set objServersCollection = Nothing
Set objProvider = Nothing
Set locatorObj = Nothing
GetSites = 0
End Function
UNQUOTE
In this particular example, it is put into the file myscript.vbs.
When adapting to your case, please replace this file name with what
you actually have.
In order to integrate it into the installer, you will have to declare
a CustomAction and a Binary element:
QUOTE
<CustomAction Id="caGetWebSites" BinaryKey="vbsMyScript"
VBScriptCall="GetSites" Execute="firstSequence" Return="check" />
<Binary Id="vbsMyScript" src="Binary\myscript.vbs" />
UNQUOTE
an to schedule its invocation in both InstallExecuteSequence and
InstallUISequence
QUOTE
<Custom Action=caGetWebSites" Sequence="2" />
UNQUOTE
Please note, the the value of the 'Sequence' attribute may be
different from that in the example, but make sure you have this
entry in both Execute and UI sequences and that it is on the same
position in both of them.


JH> -All-

JH> I'm kinda new to WiX and can't seem to figure out how the script
JH> GetSites is actually being called.  Do I need to create a custom action
JH> for the script and set it to execute immediately.  Any help or more
JH> complete sample would be great. 

JH> Thanks for everyone's help in advance.  I really appreciate it.

JH> John

-- 
Best regards,
 Valery                            mailto:[EMAIL PROTECTED]


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to