Developing Windows Installer using Visual Studio

Help Please....
Working on my first Windows Installer.
In Visual Studio 2005, have added Textboxes (A) to the User Interface and want to populate property "Edit1Value" dynamically.
Can this be done?
Can I call a function from the Edit1Value property that will return a dynamic string value to this textbox?

More:
When runnig Setup.exe for any basic Windows Installer, do you know how it displays a dialog box with the default path for installing an application? I am trying to duplicate this dialog box within my Installer. My Installer not only installs an app, but a database as well. I want to prompt the user to select a path for installing the database.

So can I dynamically set the path in the Edit1Value or is there a better way to do this?
LVL 2
brian_appliedcpuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jake072Commented:
Brian,

If I understand correctly, you are developing your own Installer as an Application, correct?  I.e., this is NOT a setup project?

It's useless to continue without that knowledge, but as far as dynamically setting up properties, you can absolutely do that.

See the attached code.

Let me know,

Jake
Public Property Edit1Value As String
   Get
      ' Here you can run any code you want, or even call a procedure.
      return [member]
   End Get
   Set (ByVal Value as String)
      ' Here you can run any code you want, or even call a procedure.
      [member] = value
   End Set
End Property

Open in new window

0
brian_appliedcpuAuthor Commented:
Jake
Thanks for your reply.

My VS2005 project contains the main application, plus 2 other projects; a setup project and an Installer class library project.

It is within the Setup project where I have added one of the predefined dialog box provided by VS2005; the "Textboxes (A)" dialog box. In the Properties window, the "Textboxes (A)" dialog box has, as one of its properties, an Edit1Value property. Whatever is literally assigned to the Edit1Value property during design-time becomes the default value that appears in the 1st textbox of the dialog box during run-time.

Rather than assign a literal value to the Edit1Value at design-time, I am trying to assign a value to this property at runtime. What I don't understand is how to execute *any* code to fill this property before the dialog box appears during Setup. Whether the code is Property Get, Property Set, or any other code, I just can't figure out how to execute the code before the dialog box appears. Any GUIs added to the Setup project seem to always execute before any subroutines, functions, or custom action can be executed.

Hope I've not confused you further.
- Steven
0
jake072Commented:
Steven,

I have tried and tried, but I don't think that you can do anything at runtime in the setup project.  You may want to create your own project that emulates a setup project.

Or, use an open source installer creation software.

This seems to be seriously lacking in the Setup Projects for .NET.

(I use Inno Setup)

Sorry,

Jake
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.