VS 2005 C#
I am using a installer class as I need a custom action that will read in a xml config file.
So when the user double clicks the setup, there will be a config.xml file in the same folder. I would like to read in this config.xml file on install event. The folder will contain setup.exe and config.xml
However, the code gives me the location of where the custom action has been installed to.
What I am looking for is this.
1) The user will download a zip file that will contain a folder with the setup.exe and config.xml.
2) The user can unzip this anywhere on their computer. i.e. desktop.
3) They double click the setup.exe and I would like to get the location of where they have unzipped. Which would be the folder with the setup.exe and config.xml.
4) Its that config.xml I would like to read in.
The config.xml is not packaged in the setup.exe. This is because the client would like to make some changes to the application after the setup.exe has been created.
Actually just to give further information. I give the setup.exe to the client plus a config.xml file, they will zip this up and make it downloadable form their website, so they customers can use it. However, if they want to change something like IP address that the application uses, they can use this config file and get the customers to download again. This is because they don't want to have another setup.exe created.
So that is why I am using the step above,
protected override void OnAfterInstall(System.Collections.IDictionary savedState)
// Create a data table to hold the contents of the xml file
DataTable dt = new DataTable();
// Test to see if it is looking for the config in the right location
// Read in