Re: Customize user prompts in Setup project?
Stephen Bub <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Could someone please tell me how exactly how to do this, i.e. read values from the .ini file with the .msi file, for use in the custom action? I don't need user prompts. Would those values be in Setup.ini, or a seperate Settings.ini? Stephen On Thu, 21 Oct 2004 15:06:43 -0400, Philip Sayers <[email protected]> wrote: >I suspect that the easiest & quickest for you would be to use .ini files >and have the admins at each site change the files before they run the >install. Your custom action then can not even prompt for the values, >but just read them form the .ini file. > > >-----Original Message----- >From: Discussion forum for developers using Windows Forms to build apps >and controls [mailto:[email protected]] On Behalf Of >Gray, Lee P. >Sent: Thursday, October 21, 2004 2:59 PM >To: [email protected] >Subject: Re: [DOTNET-WINFORMS] Customize user prompts in Setup project? > >Valid points, and may be worthwhile down the road, but that's starting >to >get into overkill for the size of this project. > >It's not a matter of trusting the user, it's a matter of inconveniencing >the >local admins who'll be installing the apps (myself included). > >For one of these apps, there are three dialogs of textboxes to fill out >for >the install with various server and database names that get written to >the >app.config. This information will rarely change at a given site, but is >different for each site. So one admin will use this installer multiple >times now and down the road, and shouldn't need to reenter all that info >over and over (this is ignoring automated package pushing for the >moment). > >What I may end up doing is simply saving multiple app.config files for >each >site and creating a custom action that *copies* the appropriate >pre-generated app.config file rather than writing it on the fly at Setup >time. Then I can prompt the installer guy for his site name which will >be >associated with his particular .config file. Then at least if a site's >information changes, they can just edit their local app.config file and >not >be bothered with many more prompts during install. > >Dang... And I thought it was so cool that I finally figured out how to >write >the file during setup! > >> -----Original Message----- >> From: Discussion forum for developers using Windows Forms to >> build apps and controls >> [mailto:[email protected]] On Behalf Of >> Philip Sayers >> Sent: Thursday, October 21, 2004 1:49 PM >> To: [email protected] >> Subject: Re: [DOTNET-WINFORMS] Customize user prompts in >> Setup project? >> >> >> If you know this info ahead of time, you could make your >> custominstall action go out to a database or webservice to >> discover the values for the install based on a user specified >> location from a dropdown list... >> >> At some point you have to trust the user to know where their >> office is, what their job title is...etc....i'm fully aware >> that we run into people who don't know this stuff, so maybe >> put a utility in your app where the user can change their >> location that will re-write the config file settings...or is >> there a way to validate the users' settings before you write >> the config file...e.g try to ping a server name, or connect >> to a specified database with the given username/password? >> >> >> -----Original Message----- >> From: Discussion forum for developers using Windows Forms to >> build apps and controls >> [mailto:[email protected]] On Behalf Of Gray, Lee P. >> Sent: Thursday, October 21, 2004 2:39 PM >> To: [email protected] >> Subject: Re: [DOTNET-WINFORMS] Customize user prompts in >> Setup project? >> >> I've got the setup project working great. It asks for values >> and populates app.config with no problem. >> >> What I want to do now is have default values show up in those >> textboxes, but the default values are different for multiple >> sites where I will distribute the app, therefore I don't want >> to compile those defaults into the MSI. >> >> > -----Original Message----- >> > From: Discussion forum for developers using Windows Forms to build >> > apps and controls [mailto:[email protected]] On >> > Behalf Of Philip Sayers >> > Sent: Thursday, October 21, 2004 1:35 PM >> > To: [email protected] >> > Subject: Re: [DOTNET-WINFORMS] Customize user prompts in >> > Setup project? >> > >> > >> > You mean things like customactions for the SetupProject >> > Where you add a UI item with say 2 textboxes, then use the user >> > specified values in a .config file? >> > >> > Or do you mean how to set those same values using the MST files? >> > >> > -----Original Message----- >> > From: Discussion forum for developers using Windows Forms to build >> > apps and controls [mailto:[email protected]] On >> > Behalf Of Greg Robinson >> > Sent: Thursday, October 21, 2004 2:33 PM >> > To: [email protected] >> > Subject: Re: [DOTNET-WINFORMS] Customize user prompts in >> > Setup project? >> > >> > Can anyone point me to a site that shows me how to do what >> he is doing >> > with his set up, prompt the user for input, using the VS Setup >> > project? >> > >> > >> > >> > -----Original Message----- >> > From: Discussion forum for developers using Windows Forms to build >> > apps and controls [mailto:[email protected]]On >> > Behalf Of Philip Sayers >> > Sent: Thursday, October 21, 2004 2:30 PM >> > To: [email protected] >> > Subject: Re: [DOTNET-WINFORMS] Customize user prompts in Setup >> > project? >> > >> > >> > I suspect that you specify the MST file in the parameters >> for the MSI >> > file. >> > >> > Start here [1] >> > Somewhere there is a tool to enable you to 'view' the MSI package's >> > internal installation database & tables. A good keyword to >> search on >> > is 'Orca'. Essentially you create a main package that has >> everything >> > in it, then the transforms allow/disallow certain features. >> > >> > I think [2] should cover most of what you need. >> > >> > [1] >> > http://msdn.microsoft.com/library/default.asp?url=/library/en- >> > us/msi/set >> > up/about_transforms.asp >> > >> > [2] >> > http://msdn.microsoft.com/library/default.asp?url=/library/en- >> > us/msi/set >> > up/windows_installer_reference.asp >> > >> > >> > -----Original Message----- >> > From: Discussion forum for developers using Windows Forms to build >> > apps and controls [mailto:[email protected]] On >> > Behalf Of Gray, Lee P. >> > Sent: Thursday, October 21, 2004 1:48 PM >> > To: [email protected] >> > Subject: Re: [DOTNET-WINFORMS] Customize user prompts in Setup >> > project? >> > >> > I can't figure out how to get the MSI to accept my custom >> parameters. >> > >> > Transform files sound like exactly what I'm looking for. >> Is it just a >> > text file? We don't have Office 2003; can you point me to some >> > examples? >> > >> > (I just did a bunch of Googling and found a ton of info, >> but no actual >> > examples.) >> > >> > Thanks! >> > Lee >> > >> > > -----Original Message----- >> > > From: Discussion forum for developers using Windows Forms >> to build >> > > apps and controls [mailto:[email protected]] On >> > > Behalf Of Philip Sayers >> > > Sent: Thursday, October 21, 2004 12:16 PM >> > > To: [email protected] >> > > Subject: Re: [DOTNET-WINFORMS] Customize user prompts in Setup >> > > project? >> > > >> > > >> > > I'm pretty sure you can do it with command line switches >> if you run >> > > the msi file from a command prompt or batch file. >> > > >> > > Also, you should look into .MST files. They are transform >> > files that >> > > work with a MSI file. If I remember correctly, you can >> use them to >> > > store installation options. For example. >> > > >> > > If you have MS Office 2003 source files on your network, you can >> > > create several MST files that will install different sets >> > of options >> > > for different groups of people.. >> > > >> > > e.g >> > > an MST for our finance dept indicates that the user get >> > Word, Excel, >> > > Outlook and Access installed. For your IT dept it >> indicates a full >> > > install For our receptionists/secretaries it indicates MS >> Word, and >> > > outlook. >> > > >> > > >> > > >> > > -----Original Message----- >> > > From: Discussion forum for developers using Windows Forms >> to build >> > > apps and controls [mailto:[email protected]] On >> > > Behalf Of Gray, Lee P. >> > > Sent: Wednesday, October 20, 2004 2:11 PM >> > > To: [email protected] >> > > Subject: [DOTNET-WINFORMS] Customize user prompts in >> Setup project? >> > > >> > > I've got a Windows Forms app that's going to be installed >> > at multiple >> > > company sites. I've created a Setup project with Visual >> > Studio. One >> > > of the Setup dialog boxes prompts for site-specific info >> > (server name, >> > > database name, etc.), which my Installer class then writes to >> > > app.config. >> > > >> > > Without creating multiple .MSI files, is there any way to >> > populate the >> > > dialog box's text fields with default values? I know I >> can specify >> > > default values within the Setup project, but I don't want >> > to compile a >> > > separate .MSI for each site. I was hoping there was a way >> > to have the >> > > .MSI file read a pre-configured .INI file or something similar. >> > > >> > > Thanks, >> > > Lee >> > > >> > >>