title: C# Install - Change a custom folder location using install dialog
body: <p>I am trying to install a windows service using a visual studio setup project. All is going well except I want the user to be able to use the install dialog to specify the location of a custom folder to be created during installation. </p>
  
  <p>I've added a Textboxes dialog that stores a folder location in an Install Property (<code>PATHPROPERTY</code> in this example) but I can't figure out how to use that to change the path of a folder I'm creating during the installation. I set the 'Default Location' Property of the custom folder in the 'File System' menu to: </p>
  
  <p><code>"[PATHPROPERTY]\folder"</code></p>
  
  <p>But when I change the path in the install dialog, the folder is created at the default location of <code>PATHPROPERTY</code>, not what I change it to during install. So it seems like the folder is created before I reach the point in my dialog where I ask for the path.</p>
  
  <p>I noticed that there is a Property Property for the folder that I can set and supposedly use to modify the location of the folder during installation, and I've seen some articles suggesting that this can be used to set the location using a command line flag. But I would like to be able to use the install dialog, then possibly set this property in my installer class, but I haven't found any documentation on how to do that yet..</p>
  
  <p>I also found something about Session.Property to set the property but <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa371681%28v=vs.85%29.aspx" rel="nofollow">the documentation</a> wasn't clear on how to use this.</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Oh. Also. I'm targeting .NET 3.5.</p>