|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
Phil Wilson wrote:
> [...] This sounds to me as if it's one > of those cases where the install is being pressed to do something that the > application should be doing, which is to offer a way to change its > configuration file. Aargh. I was afraid of that. Well, custom actions it is, then. Thanks for the help (and btw, it turns out I just bought your book ;-) --- Chris Doherty |
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
First, pardon my naivete'; I'm new to authoring MSI installs and this
project is a bit rushed ("Welcome to the deep end, and don't forget your cinder block!"). I need an installer that will include a standard configuration file in the MSI package, but can also accept and install an alternate configuration file, the path to which can be specified on the command line. From what little of the Windows Installer documentation I've been able to wrap my head around, I could a) pass the path to the alternate config file as a Public property via msiexec. And then somehow get the Installer Service to put that file where it needs to go. b) Create a transform for each alternate config file and apply the transform. This may be unwieldy as we may need to make many modifications to the config file for different environments. Are these sensible options? Am I missing some obvious best-practices way to do this (can it even be done with a straight-up MSI package, or do I need to author an executable wrapper)? And while I'm asking annoying newb questions, can anyone recommend a good relatively up-to-date book on Windows Installer? The official documentation makes my brain hurt. --- Chris Doherty |
|
|
|
#3 (permalink) |
|
Guest
Posts: n/a
|
You're some way out of usual practice here because what MSI installs is
static, in the sense that the files are in the MSI file(or otherwise defined by the MSI file but in a cab or external). This sounds to me as if it's one of those cases where the install is being pressed to do something that the application should be doing, which is to offer a way to change its configuration file. If the requirement is for the install to offer a browse to this config file then: You need an extra dialog that can browse to a file, and there is no file browser in the standard MSI controls, just folders. You need a custom action that will copy the named file to the install folder. You probably need to turn off copying the old file. You need an uninstall custom action to remove the file. If this is something like a Winforms app that uses a config file it really would be easier for the app to do in 30 lines of code, browsing to a config file and restarting itself, and you wouldn't need to re-install to change it. -- Phil Wilson Definitive Guide to Windows Installer http://www.apress.com/book/view/1590592972 "Chris Doherty" <christopher.doherty@ca.flextronics.com> wrote in message news:OgefGaNHJHA.4564@TK2MSFTNGP02.phx.gbl... > First, pardon my naivete'; I'm new to authoring MSI installs and this > project is a bit rushed ("Welcome to the deep end, and don't forget your > cinder block!"). > > I need an installer that will include a standard configuration file in the > MSI package, but can also accept and install an alternate configuration > file, the path to which can be specified on the command line. > > From what little of the Windows Installer documentation I've been able to > wrap my head around, I could > > a) pass the path to the alternate config file as a Public property via > msiexec. And then somehow get the Installer Service to put that file > where it needs to go. > > b) Create a transform for each alternate config file and apply the > transform. This may be unwieldy as we may need to make many > modifications to the config file for different environments. > > Are these sensible options? Am I missing some obvious best-practices way > to do this (can it even be done with a straight-up MSI package, or do I > need to author an executable wrapper)? > > And while I'm asking annoying newb questions, can anyone recommend a good > relatively up-to-date book on Windows Installer? The official > documentation makes my brain hurt. > > --- > Chris Doherty |
|