Hi Gene,
I believe so. Here's a quick rundown of how you can accomplish those tasks.
[User Interface Editor]
1. Open the "User Interface Editor" (one of the buttons that appear on top of the Solution Explorer when you have the Setup Project
file selected) and add another dialog to the setup wizard, such as Textboxes (A). I recommend placing it before the "Confirm
Installation" screen. Note the name you assign to the textbox in the Properties Window, for instance Edit1Property=MYDATAFILE,
because you'll need to bind this property to an argument that will be sent to your custom installer class.
[Installer Class]
2. Add a class library to your project, if one doesn't already exist that will ship with the product, and add a new "Installer
Class" file. Here you can override some methods that allow you to retrieve arguments and perform work during installer events.
You'll probably want to override the OnCommitted method to ensure that all of the files necessary to do work have been copied to the
application directory. Use this class to copy the data file from the installation directory to the directory they have chosen in
your custom dialog interface and to modify the xml file. The class can be implemented in any .NET language. To get the location
that the user selected, which your class needs to do its work, you can access the InstallContext.Parameters property. To get your
parameter in that property see the next step.
[Custom Actions Editor]
3. Open the "Custom Actions Editor" and add your class assembly reference as a custom action. The installer will load all of the
Installer Classes in your assembly as part of the installation. Under the Commit folder (the folder you choose depends on the event
you are handling), select your assembly in the Custom Actions Editor and look at the Properties Window. Make sure Installer Class
is set to true. Set CustomActionData to something like this, /MyDataFile="[MYDATAFILE]", where MYDATAFILE is the name of the
TextBox in which the user entered the location and you want to pass into your custom installer class. Access the property like
InstallContext.Properties["MyDataFile"].
FYI, I remember having trouble with variables that represented physical path information that last time I did something like this.
If you have trouble as well there are plenty of resources on the web that explain the property syntax. Also, the CustomActionData
field in general I remember being a bit stubborn in terms of its syntax.
Windows Installer Property Reference on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/property_reference.asp
Windows Installer Guide on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/property_reference.asp
GL