Setup & Deployment - how can I specify a network folder at install-time?

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

Hello everyone:

I am developing a VB.Net Windows Application and I am now ready to create
the deployment project for it.

This application needs to be installable on a different number of users /
clients, and the application has an Access DB out on their network.
How can I create a deployment routine where I can have a dialog box prompt
for the network share (i.e. \\server\dbfolder) at install-time?
Once network the share is specified I would then need to be able to have the
deployment / install routine write what was input from that dialog box to
the registry?

I've searched the NG's and reference books and am coming up with nothing.
Does anyone know how I can do this?

Your help is greatly appreciated !! Thank you in advance.

- Paul.
 
Hi Paul

You could do this in 2 ways
1. Create a custom installer class that would allow you to prompt a
network/file dialog.

see System.Configuration.Install.Installer for information.
This allows you to communicate to the installer using variable information
and fields you create.

Custom installers is pretty nice after using it a couple of times.

2. Create a form within the installer to capture the information, this means
the user is going to have to "type" the information into a text box which
you then can use with install actions.

Method 1 might be more what you are looking for , I think

Henk
 
Henk, thank you for that info - I really appreciate it.

For method #2 (create a form) would I use the User Interface Editor of the
Deployment project to create the form, or would I have to create a new
windows form and somehow link it in via the User Interface Editor? I'm
asking because the UI editor has dialog boxes you can choose from but none
seem to allow for a dialog box with a text box field on it.

Thanks again,
Paul.
 
Just an update, I did find the TextBoxes dialog boxes in the User Interface
Editor.
So from this point, I just have to look up how to use them.

- Paul.
 
HI Paul

Yes, you can now use the form ID as a internal variable during setup. I
still think a custom installer might be more what you are looking for, this
allows a little more control over writing to file's etc.

henk
 
Hi Henk, thank you again for your help.

Would you know of any books or resources that would provide more details
(walkthroughs) for setting up the custom installer as you've described
below - that is, to collect a network share / folder to be written to a
registry entry?

Best Regards,
Paul.
 
Hi Paul

Unfortunately I did not find any, I found some sample code and adopted my
code accordingly

I found these articles and they may help, I can always send you a sample
file, but this articles seem to be very helpful.

To answer your other question.
You probably going to use the open dialog control available in .NET or build
your own, depending what you want to do, I.E Allow the user to map a drive
dynamically or simply just select a existing network mapped drive. (the
latter you can use the default open dialog).

See
http://www.devx.com/dotnet/Article/20849
http://msdn.microsoft.com/vstudio/default.aspx?pull=/library/en-us/dnhcvs04/html/vs04j7.asp

The last one listed seem to be a very good article..A sure keeper!!

Remember, once you are in the custom action, then you can use all the
classes available to you in the .NET framework to read/write to resources
providing the isstalation is done with administrative priveledges or rights
to access these resources.

Henk
 
Back
Top