Specifying a path via Setup project in .NET
Posted on 2012-03-17
I have a windows application written in C# that reads data from XML file. XML file relative path is stored in app.config file and application code adds the relative path it finds in a config file to an application path, so that it looks for XML file in the application directory.
What I want is to allow the user to specify a path to the XML file during installation via setup/deployment project. The file could be either on a share or on the user's hard drive.
I want the user installing the app to have a choice to specify that path or not and if not, then I want application to retrieve it from a config file, but if user specifies the path to the XML file, then use that path.
Can anyone help?