1

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.

Shipu
  • 543
  • 14
  • 27

2 Answers2

0

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.

Community
  • 1
  • 1
Davide Piras
  • 43,984
  • 10
  • 98
  • 147
  • if I add a textbox(a) dialog and take virtual directory name and physical path as input from user ,how the web setup copy the website files in that virtual directory which got created. – Shipu Oct 18 '11 at 10:27
0

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);