![]() ![]() The problem I have found is that the call to Application.StartupPath does not return the location that the install is running from. Copy(fileInfo.FullName, installLocation + + fileInfo.Name) Loop through the files and copy them to the install directory.įile. Get the list of files in the directory. CreateDirectory(installLocation + + dir.Name) Make the directory in the install location.ĭirectory. Loop Through the directories and copy over all the filesįoreach ( DirectoryInfo dir in directories) Create an array representing the files in the directory.ĭirectoryInfo directories = di.GetDirectories() GetExecutingAssembly().Location) ĭirectoryInfo di = new DirectoryInfo ( Application. Create a reference to the current directory. String installLocation = Context.Parameters I have overridden the Install method in my custom installer class and added the following code: The catch is that I want the database and images to be able to be replaced, so I need to copy all the files in the two sub-directories without prior knowledge of what they are. I have also written a custom installer class to copy the files required to the install directory. The database is in a sub-folder of the application and the images are in another sub-folder. I have written an application that displays images using data from a database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |