Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / December 2005

Tip: Looking for answers? Try searching our database.

getting info from install

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
justin.creasy@gmail.com - 09 Nov 2005 18:39 GMT
I imagine there is a fairly straight forward answer to this problem, I
just don't have any real experience with setup and deployment projects.
I want to get some information from the user during install. In this
case all I want to get is an integer. I know how to create a form using
the S&D project. I picked Textboxes (A) and setup the labels and
everything.

I just want to know how do I actually get ahold of the integer the user
enters. I'll need this number the first time my program runs to
configure it properly. So I know how to name the property, I just have
no idea how to get to it once install is done.

As I said before, I'm sure this is pretty easy, I just don't know what
I am doing and a quick google search has not found the information I
need. Thanks in advance ~ Justin
Phil Wilson - 10 Nov 2005 14:58 GMT
Depends what you mean by "get hold of". In general you use [TESTBOXA1] (or
whatever the property name is called, case-sensitive) wherever you want to
use it. If you want to store it in the registry, create a data item and give
it the value [TESTBOXA1] if you want to pass it to a custom action, put it
in CustomActionData the same way (Installer class syntax differs from other
custom actions).

Signature

Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

>I imagine there is a fairly straight forward answer to this problem, I
> just don't have any real experience with setup and deployment projects.
[quoted text clipped - 11 lines]
> I am doing and a quick google search has not found the information I
> need. Thanks in advance ~ Justin
justin.creasy@gmail.com - 10 Nov 2005 15:56 GMT
Well, I only know how to create a setup project using the wizard. So
I've added my Dialog form with the textbox to the project, but I don't
know how to access any code relating to it. It would be perfect if I
could set up some event that fired when the user pressed "next". Then I
could get the value in the TextBox and write it to a file or something.
My problem is I don't know how to programmatically control the install
at all, I only know how to add stuff to it using the wizard.

This is killing me because I'm sure it's some stuipid answer, I just
can't figure out how to programmatically control it at all. Is there
some place where I can view the code?
Phil Wilson - 10 Nov 2005 21:26 GMT
Nope, sorry. Keep in mind that VS is just one of about 20 tools that can be
used to generate MSI files, and VS isn't one that has an IDE into all the
Windows Installer features. The VS IDE allows you to add some extra dialogs
and get the entered values, but it doesn't expose the events so that you can
hook code to dialog buttons.   This kind of extra functionality is provided
by many of these:
http://www.installsite.org/pages/en/msi/authoring.htm
Signature

Phil Wilson [MVP Windows Installer]
----

> Well, I only know how to create a setup project using the wizard. So
> I've added my Dialog form with the textbox to the project, but I don't
[quoted text clipped - 7 lines]
> can't figure out how to programmatically control it at all. Is there
> some place where I can view the code?
jcreasy - 11 Nov 2005 14:55 GMT
Well, all I want is to get the entered values, I just don't know how to
get them. I understand the TextBoxes have names, but I don't know how
to use those names to access the values. Maybe I can explain a little
better what I want to do. My application is meant to be installed in a
school computer lab. So that more than one instance of the master
program can be installed, I want the user to enter a "room code" that I
can use to let the clients know which master to respond to. I could get
this information from a form that I show the first time the application
runs, but it made more sense to me to have it be part of the install.
So I just need a screen during install where I can explain the room
code function, and have the admin enter a number which I can save for
later, maybe in a file. So using the wizard I can create the form, and
text, and all that fancy stuff, but I don't know how to access the
entered text to save somewhere. I'm sure this is possible, just don't
know how to do it. Again, any help is always very appreciated.
Phil Wilson - 11 Nov 2005 20:01 GMT
Using Textboxes(A) dialog as an example, F4 with the dialog selected shows
Edt1Property to be EDITA1. This property will contain the value that's
entered. If you want to save in the registry, just create a registry item
and give it the value [EDITA1] and it will be resolved at run time to the
value actually entered. If you want to put it in a file, pass it to a custom
action to write it. A VBScript or C++ Dll, you'd pass [EDITA1] in
CustomAction Data or in an Installer class you'd pass /myarg=[EDITA1].

See if these help:

http://www.simple-talk.com/2005/04/25/getting-started-with-setup-projects/
http://www.simple-talk.com/2005/06/07/visual-studio-setup/
http://www.simple-talk.com/2005/07/18/updates-to-setup-projects/
Signature

Phil Wilson [MVP Windows Installer]
----

> Well, all I want is to get the entered values, I just don't know how to
> get them. I understand the TextBoxes have names, but I don't know how
[quoted text clipped - 11 lines]
> entered text to save somewhere. I'm sure this is possible, just don't
> know how to do it. Again, any help is always very appreciated.
jcreasy - 11 Nov 2005 22:51 GMT
Thanks, that's exactly what I needed!
jude smith - 09 Dec 2005 12:52 GMT
Try looking at this - it should make the basics clear:

http://www.codeproject.com/dotnet/Easy_Custom_Setup.asp

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.