Last post Jul 27, 2009 05:30 AM by Thomas Sun – MSFT
Jul 22, 2009 01:17 PM|mmallit|LINK
I have made a Web Setup project in Visual Studios 2008 and trying to install on machines running Server 2003( IIS6) and Server 2008( IIS7). While installing or after, I would like a custom action to occur that will do two things, change a folder’s authentication
to Windows Authentication and make a virtual directory bound to a physical directory. Also after installing I am trying to get Internet Explorer to open with the installed application. I’ve tried using MWA (Microsoft Web Administration) to get the paths but
it is IIS 7 specific. For authentication I am currently using DirectoryEntry and changing the AuthFlags of that entry:
The problem with this is getting the Path that I need for this. When using MWA, the custom action worked, and the path was formatted as “ W3SVC/1/Root/AppName/Admin”. Now I need to find a way of getting this path.
For opening IE after install, I am using:
System.Diagnostics.Process.Start("C:\\Program Files\\Internet Explorer\\iexplore.exe", "http://localhost/" + /*Port*/ + targetvDir + "/Admin/");
I am able to get the targetvDir by passing it to the custom action, but not able to get the Port number.
Jul 27, 2009 05:30 AM|Thomas Sun – MSFT|LINK
The default port is 80. Do you allow customer to specify the port in the web setup install wizard? If so, you can use CustonActionData and set corresponding name/value pairs in User Interface, where customer can input port num and you can retrieve it in
For example, we create Custom Action and use following CustonActionData:/PortValue="[Port]".
Then we can get select value from Custom Action:
public override void Install(System.Collections.IDictionary stateSaver)
string str = Context.Parameters["PortValue"];
For related example, see
I look forward to receiving your test results.