It is currently Fri Apr 19, 2024 2:51 pm

All times are UTC - 7 hours [ DST ]

Recent News:



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Oct 16, 2009 10:12 pm 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
So when using Wix as an installer, if you want to install a virtual directory under the default website of IIS, you must specify the host header and the port, if they are different then the default values.

In my case some users have changed the header and port , and thus WIX fails to install my application.

I have yet to find a way for Wix to retrieve this information or set a wildcard(wildcards dont seem to work, only for the ip address)

Sooo I found a way to get this information in Vb.net using a custom action in WIX. However how do I, if even possible pass a value from a vb.net module back to the wix installer ><.

Heres my vb.net code..

Dim entry As DirectoryEntry = New DirectoryEntry("IIS://localhost/w3svc/1")
Dim pvc As PropertyValueCollection = entry.Properties("ServerBindings")

For Each value As Object In pvc
Dim bits() As String = value.ToString().Split(":")

Dim IPAddress = bits(0)
Dim TCPIPPort = bits(1)
Dim HostHeader= bits(2)

Next


Top
 Profile  
Thanks  

Attention Guest: Remove this ad by Registering with the MediaSmartServer.net Forums. It's Free!
PostPosted: Sun Oct 18, 2009 9:07 am 
Offline
Uber Moderator
Uber Moderator
User avatar

Joined: Sun Dec 02, 2007 3:29 am
Posts: 1736
Location: Brighton, England
Thanks: 27
Thanked: 202 times in 152 posts
I've not needed to do this before, but you might be able to pull up the info you need with the Deployment Tools Foundation. A good starting point would be http://blog.deploymentengineering.com/2 ... ustom.html and http://blogs.msdn.com/jasongin/archive/ ... oject.aspx

_________________
Have you tried our Add-Ins? If so, be sure to Rate them at WeGotServed.
Help support MediaSmartServer.Net!


Top
 Profile  
Thanks  
The following user would like to thank Cougar for this post
snowdins
PostPosted: Sun Oct 18, 2009 8:11 pm 
Offline
1TB storage
1TB storage

Joined: Wed Sep 30, 2009 7:28 pm
Posts: 36
Thanks: 8
Thanked: 0 time in 0 post
As always you are the man. This looks very do able for my code.
:cheers:


Top
 Profile  
Thanks  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group