473,545 Members | 529 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1871
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=M YDATAFILE,
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 CustomActionDat a 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 CustomActionDat a
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*********@gm ail.comwrote in message news:11******** **************@ b28g2000cwb.goo glegroups.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
4072
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 application messages. The asp.net application will not be running under an account with administrative permissions and so this will not be able to create...
4
1769
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 installation service gets installed depending on the selection of user using checkbox. But when I uninstall the setup using add remove programs It is...
4
1303
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 anywhere but simply included into the package? E.g. I want to include install_docs.txt (as losely packaged) but it should not be copied to the...
4
3505
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 objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the...
0
3031
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 objective in utilizing this new deployment method is to reduce the maintenance overhead as well as making it easier for my users to setup and run the...
0
1264
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 prerequisites for the target computer along with the .Net Framework 2.0 in my deployment project. Visual Studio 2005 provides the facility of adding...
13
9682
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 to set the Condition property of a custom action to determine if the currently running install is upgrading a previous installation and if so how? ...
0
1321
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 Deployment project. This is an upgrade of an old VB6 app which used the Registry to persist certain data, but the C# app doesn't use the Registry - it...
3
5844
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 installation I also install the PostgreSQL database and along with that I need to execute some Custom Actions. I've created a Custom Installer...
0
7465
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.