473,587 Members | 2,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

simple question: Web setup project installer. changing installation directory

Hi,

I am trying to create an installer for my web application. So I added a
web setup project to my solution (I am using VS.NET 2003). Been playing
around with it since then and it basically works.

Now, I am wondering if there is any way to change the directory that
the installer installs the files to. I want to be able to put my files
in a specified directory (user specified is good, but i don't mind
hardcoding the path either) and point my virtual directory to it.

Is there any way to do this. Right now the files are just being stored
in c:\...\inetput\ wwwroot\Project FileName directory. I opened up the
File system editor and looked at the properties for the WebApplication
Folder. One of the properties is called property TARGETDIR. I assume
this is the property i need to change?
From what I gathered on the web and newsgroups, this property can be

accessed "programaticall y". Is this correct? Can anyone tell me me how
to access and set this property. As I said, Ideally I would like to
give the user the option of specifying the physical directory, but i
don't mind hardcoding that during design time either.

Jul 21 '05 #1
2 5338
Thanks for the reply Kannan,

Yes, the articles have helped. But from what i gather the CustomAction
is executed after the installation. By this time the directory
structure has already been created. (Isn't that correct?)

Is there any way to programmaticall y create virtual directories. I.e
create and ordinary directory structure and point a virtual directory
to it. There are some code snippets for this floating around, but they
are all written in VB, not C#. I haven't found one in C# yet. Is the
only way to create virtual directories and configure IIS to use VB? (If
so, I might have to start learning to code in VB). Or is there a c#
option?

I read somewhere that the solution to this is to use an ordinary setup
project (not a web setup) and create the directory structure, and then
point the virtual directory to it. Is this really the best way to do
things or is there a web setup solution?

How do I get CustomAction to execute before the installation. In the
installer class there is a BeforeInstall event. Is this what I have to
use create my virtual directory programmaticall y (if that is the way to
go).

There seems to be a lot of bits and pieces around and related sequence
tasks to be done. So far I haven't found a good comprehensive solution.
Surely someone out there has already done this before? Just need a bit
more help piecing the puzzle together.

Thanks all in advance.
PS: I haven't been able to access Context.Paramet ers["INSTALLDIR "] so
far. Keeps throwing an "object reference not set to an object instance"
error during installation. And from what I gather, this is a property
that is set by the installer after installation. Not something the
CustomAction can set before installation. Am I correct?
Kannan.V [MCSD.net] wrote:
hi....

for reading the values from the install program, i guess u must have added custom forms to ur install app from the setup project, in this case u have to create a custom installer class to read the values from the installer application and do the required job, once u have created ur installer class u need to add this dll file as a custom action to the installer,
so when the installer runs, the code in the installer class also gets executed.

you need to pass the parameters thro the custom action data property in the setup app.
Ex. - /INSTALLDIR="[INSTALLDIR]"
and inside the installer class you can read the parameters as shown below. Console.WriteLi ne(Context.Para meters["INSTALLDIR "].ToString());

check out these links for further reading.
http://www.c-sharpcorner.com/Code/20...nstClasses.asp

http://msdn.microsoft.com/library/de...classtopic.asp
hope this helps,
Bye

Kannan.V
http://kannanv.blogspot.com

"MENTAT" wrote:
Hi,

I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically works.

Now, I am wondering if there is any way to change the directory that the installer installs the files to. I want to be able to put my files in a specified directory (user specified is good, but i don't mind
hardcoding the path either) and point my virtual directory to it.

Is there any way to do this. Right now the files are just being stored in c:\...\inetput\ wwwroot\Project FileName directory. I opened up the File system editor and looked at the properties for the WebApplication Folder. One of the properties is called property TARGETDIR. I assume this is the property i need to change?
From what I gathered on the web and newsgroups, this property can
be accessed "programaticall y". Is this correct? Can anyone tell me me how to access and set this property. As I said, Ideally I would like to
give the user the option of specifying the physical directory, but i don't mind hardcoding that during design time either.


Jul 21 '05 #2
hi MENTAT,

As you have said the directory structure for the web setup projects are
created at the start of the install process, tried to play around with it,
but was not able to get a way to manipulate it.

You can programatically create directories and point to a virtual directory.
and there is no difference in using VB or C#, you must be able to do
whatever you do in VB using C#, the only difference is the syntax and a
little bit of the way they both handle things, but thats got nothing to do
with the coding or the logic part.

Yes we can use the Ordinary setup project to create folders and point to the
virtual directory.

Will post with more info once try something on my box.

PS : For websetup projects use the ["TARGETDIR"] as the parameter.

"MENTAT" wrote:
Thanks for the reply Kannan,

Yes, the articles have helped. But from what i gather the CustomAction
is executed after the installation. By this time the directory
structure has already been created. (Isn't that correct?)

Is there any way to programmaticall y create virtual directories. I.e
create and ordinary directory structure and point a virtual directory
to it. There are some code snippets for this floating around, but they
are all written in VB, not C#. I haven't found one in C# yet. Is the
only way to create virtual directories and configure IIS to use VB? (If
so, I might have to start learning to code in VB). Or is there a c#
option?

I read somewhere that the solution to this is to use an ordinary setup
project (not a web setup) and create the directory structure, and then
point the virtual directory to it. Is this really the best way to do
things or is there a web setup solution?

How do I get CustomAction to execute before the installation. In the
installer class there is a BeforeInstall event. Is this what I have to
use create my virtual directory programmaticall y (if that is the way to
go).

There seems to be a lot of bits and pieces around and related sequence
tasks to be done. So far I haven't found a good comprehensive solution.
Surely someone out there has already done this before? Just need a bit
more help piecing the puzzle together.

Thanks all in advance.
PS: I haven't been able to access Context.Paramet ers["INSTALLDIR "] so
far. Keeps throwing an "object reference not set to an object instance"
error during installation. And from what I gather, this is a property
that is set by the installer after installation. Not something the
CustomAction can set before installation. Am I correct?
Kannan.V [MCSD.net] wrote:
hi....

for reading the values from the install program, i guess u must have

added
custom forms to ur install app from the setup project, in this case u

have to
create a custom installer class to read the values from the installer

application and do the required job, once u have created ur installer

class u
need to add this dll file as a custom action to the installer,
so when the installer runs, the code in the installer class also gets

executed.

you need to pass the parameters thro the custom action data property

in the
setup app.
Ex. - /INSTALLDIR="[INSTALLDIR]"
and inside the installer class you can read the parameters as shown

below.
Console.WriteLi ne(Context.Para meters["INSTALLDIR "].ToString());

check out these links for further reading.
http://www.c-sharpcorner.com/Code/20...nstClasses.asp

http://msdn.microsoft.com/library/de...classtopic.asp

hope this helps,
Bye

Kannan.V
http://kannanv.blogspot.com

"MENTAT" wrote:
Hi,

I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically works.

Now, I am wondering if there is any way to change the directory that the installer installs the files to. I want to be able to put my files in a specified directory (user specified is good, but i don't mind
hardcoding the path either) and point my virtual directory to it.

Is there any way to do this. Right now the files are just being stored in c:\...\inetput\ wwwroot\Project FileName directory. I opened up the File system editor and looked at the properties for the WebApplication Folder. One of the properties is called property TARGETDIR. I assume this is the property i need to change?

>From what I gathered on the web and newsgroups, this property can be accessed "programaticall y". Is this correct? Can anyone tell me me how to access and set this property. As I said, Ideally I would like to
give the user the option of specifying the physical directory, but i don't mind hardcoding that during design time either.


Jul 21 '05 #3

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

Similar topics

3
2094
by: Ryno Rijnsburger | last post by:
I am busy packaging our product as a standard Setup project in VS.NET that uses a bunch of merge modules (basically, a merge module for every key infrastructure component in our system). Part of the installation needs to "dump" a bunch of files (third party product's project files) to the user's system. These files are transient in nature...
1
1028
by: santhosh_176 | last post by:
:I Created a Pocket PC application for iPAQ 5450. Every thing went fine even installer creation. I could run the setup and install it into the actual device and worked fine. The application enables syncronization with remote database using merge replication. I found contradictory results while installing the application. I will mention here...
1
2092
by: Michael A. Covington | last post by:
When I build my setup project, I get three files: setup.exe, setup.ini. and myapplication.msi. These go into a folder called (setup project)/bin/Release. If any other files are in that folder, they get deleted. What I'd *like* is that when I build the setup project, the files that it creates should go into a directory that I specify, and...
4
7067
by: bob lambert | last post by:
Help I am trying to deploy to another pc a vb.net std 2002 windows form application. I am confused. I created a project - windows form I built form, compiled and debugged. I created a deployment project (myproj installer) I added my windows app to the installer under myproj installer properties, I set bootstrapper
2
792
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically works. Now, I am wondering if there is any way to change the directory that the installer installs the files to. I want to be able to put my files...
0
1202
by: thomas.dunn | last post by:
Hello, I am writing a web setup project that acts as a patch that replaces some resource files of an asp.net application that has previously been installed by a web setup installer. What I want is to use the standard Installation Address dialog that asks for virtual directory name and port, but I DO NOT want my new patch installer to...
1
7139
by: kplkumar | last post by:
Hi I am new to this. I am trying to create a setup project to package our stuff and create an installer. This is what I want to do, I have a directory sructure in which we have our RootSource\Web (which has web stuff) RootSource\Business (which has class libraries)
0
1363
by: kplkumar | last post by:
Hi I am new to this. I am trying to create a setup project to package our stuff and create an installer. This is what I want to do, I have a directory sructure in which we have our RootSource\Web (which has web stuff) RootSource\Business (which has class libraries)
1
1885
by: capella07 | last post by:
In VS2005 I have a working setup project that installs several CABs with the main app. I also need to have a setup project that only installs the app itself. I created a new setup project and added the build output of the deployment CAB, and the primary output from my custominstaller dll class. So the only difference between the first, working...
0
7915
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
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8205
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
8220
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
6619
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...
1
5712
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3840
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
2347
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
1452
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.