473,386 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Custom deployment even possible?

I would like to know if the following is even possible with the visual
studio.net Setup and Deployment project.

1. During the deployment after creation of application directory the
setup needs to prompt user to select another location to send a data
file elsewhere on target machine (with ability to create this
directory).
2. After that this secondary location selected/created by the user,
this location needs to be inserted into an XML files which was earlier
placed in the application directory.
Thanks

Aug 13 '06 #1
1 1853
Hi Gene,

I believe so. Here's a quick rundown of how you can accomplish those tasks.

[User Interface Editor]
1. Open the "User Interface Editor" (one of the buttons that appear on top of the Solution Explorer when you have the Setup Project
file selected) and add another dialog to the setup wizard, such as Textboxes (A). I recommend placing it before the "Confirm
Installation" screen. Note the name you assign to the textbox in the Properties Window, for instance Edit1Property=MYDATAFILE,
because you'll need to bind this property to an argument that will be sent to your custom installer class.

[Installer Class]
2. Add a class library to your project, if one doesn't already exist that will ship with the product, and add a new "Installer
Class" file. Here you can override some methods that allow you to retrieve arguments and perform work during installer events.
You'll probably want to override the OnCommitted method to ensure that all of the files necessary to do work have been copied to the
application directory. Use this class to copy the data file from the installation directory to the directory they have chosen in
your custom dialog interface and to modify the xml file. The class can be implemented in any .NET language. To get the location
that the user selected, which your class needs to do its work, you can access the InstallContext.Parameters property. To get your
parameter in that property see the next step.

[Custom Actions Editor]
3. Open the "Custom Actions Editor" and add your class assembly reference as a custom action. The installer will load all of the
Installer Classes in your assembly as part of the installation. Under the Commit folder (the folder you choose depends on the event
you are handling), select your assembly in the Custom Actions Editor and look at the Properties Window. Make sure Installer Class
is set to true. Set CustomActionData to something like this, /MyDataFile="[MYDATAFILE]", where MYDATAFILE is the name of the
TextBox in which the user entered the location and you want to pass into your custom installer class. Access the property like
InstallContext.Properties["MyDataFile"].

FYI, I remember having trouble with variables that represented physical path information that last time I did something like this.
If you have trouble as well there are plenty of resources on the web that explain the property syntax. Also, the CustomActionData
field in general I remember being a bit stubborn in terms of its syntax.

Windows Installer Property Reference on MSDN:
http://msdn.microsoft.com/library/de..._reference.asp

Windows Installer Guide on MSDN:
http://msdn.microsoft.com/library/de..._reference.asp

GL

--
Dave Sexton

"Gene" <ge*********@gmail.comwrote in message news:11**********************@b28g2000cwb.googlegr oups.com...
>I would like to know if the following is even possible with the visual
studio.net Setup and Deployment project.

1. During the deployment after creation of application directory the
setup needs to prompt user to select another location to send a data
file elsewhere on target machine (with ability to create this
directory).
2. After that this secondary location selected/created by the user,
this location needs to be inserted into an XML files which was earlier
placed in the application directory.
Thanks

Aug 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: T | last post by:
I have a web site i want to deploy using a VS.NEt set up project. I have no problems with that, that is fine and works no problem. But the web application uses a custom event log to log...
4
by: Uppi | last post by:
I have a setup Project which consists of 7 services. I have created it using Setup and Deployment Project. I have not used installer class. The Problem is that when I select service for custom...
4
by: Oleg Ogurok | last post by:
Hi all, Is there a way to get the path to the temp directory where installation files are unpacked to? Also is there a way to specify in a deployment package that a file should not be installed...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
0
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
0
by: Ashwin | last post by:
Hi, I am trying to build a Set Up and Deployment Project for my Application using Visual Studio 2005 Set up and Deployment Project. I need to install two custom applications installable as the...
13
by: Matt F | last post by:
I have a deployment project that I'm setting up. I need to perform a different custom action based on whether this is a first time install or an update. Does anyone have any idea if it's possible...
0
by: David Jackson | last post by:
Hello, I'm not sure if this is precisely the correct newsgroup for this, so I apologize if it isn't.. Scenario: a WinForms app written in VS.NET 2005 (C#) and installed via a Setup and...
3
by: KennethLundin | last post by:
Hi, i'm developing a solution in VS9/CSharp. Now I'm constructing a deployment project for my appliation (thick, database driven, winforms, standard, good old type of application). During...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.