I want to install my virtual directory other than the default location(c:\inetpub\wwwroot). I want that the directory will be created in the physical path enntered by the user.
Please suggest any way to do that.
I want to install my virtual directory other than the default location(c:\inetpub\wwwroot). I want that the directory will be created in the physical path enntered by the user.
Please suggest any way to do that.
not exactly what you ask but follow the steps described in the main answer here: Virtual Directory in Web Setup Project
...and instead of changing TextBoxes to not visible keep them visible so you can capture user input.
Using the System.EnterpriseServices.Internal.IISVirtualRoot you can create a Virtual direcoty through C#,
System.EnterpriseServices.Internal.IISVirtualRoot vr = new System.EnterpriseServices.Internal.IISVirtualRoot();
string sError = "";
vr.Create("IIS://localhost/W3SVC/1/Root", physicalPath, VDName, out sError);