I am using VS 2005. I have developed a pluign for another appliction. My plugin is a .net dll setup for COM interopability. Part of my code is to create a text file and read//write some information into that file.
I am working now on a Setup and Deployment project to use the bootstrapper built into VS2005. During the setup, the user can choose whichever directory path they want to install the plugin to. If I want my text file created from code to be stored in the same directory as the installation path chosen by the user, how can I accomplish this? I have thought of three solutions...
1. instead of specifying a path in my plugin code, can i have the file created wihtout a path. And the path is just then the current directory -- i am not sure how to do this in code, i tried but did not work. I also do not know if it will create the file in my installation directory or the calling application which loads the dll?
2. At time of installation, store the installation path into the registry - so that I can then write code in my plugin to pull that path and create my file in that path. How do I get the setup and deployment project to write the install path to the registry?
3. Hard code the install path into the setup and deployment project -- and not allow the user to make changes to the install directory -- is this possible?
Any thoughts on which method is better and how to accomplish any of them?
Thanks!