?
Solved

Custom Folders (.NET Install)

Posted on 2004-09-17
10
Medium Priority
?
223 Views
Last Modified: 2012-03-15
I have a setup and deployment project for my C# windows service.  I added a custom folder in the "File System Editor".  I now want to be able to prompt the user for the path of that custom folder and then set it in the "File System Editor" section programmatically.  How can I do this?
0
Comment
Question by:ardolino
  • 6
  • 3
10 Comments
 
LVL 5

Expert Comment

by:tomasX2
ID: 12088802
That´s not that easy with a regular msi setup.
You can add a user interface with a textbox and ask the user to input a filepath but the standard vs.net setup does not have a file path dialog so he would have to type it.
Might be possible with orca( an msi database editing tool that comes with the installation sdk) to edit that.
The setup asks you for a file path in the installation path dialog(step 2 of the install)... couldn´t you have this other folder relative to that?

0
 

Author Comment

by:ardolino
ID: 12088977
My problem is that I need to find the location of the INETPUB directory.  I figured out how to query IIS using System.DirectoryServices, and I can obtain the default directory of Web Site (IIS://localhost/w3svc/1/Root).  I want to load the text box with the correct directory.  Right now, the value is hard-coded to c:\inetpub\wwwroot in the value property section of the text box for my setup project.

If this cannot be done, I have an alernate solution, but I'd rather do it this way.  I know you can pass custom data using CustomDataAction to the derived Installer class, but I need to know if there is a way to set property values from the Installer class, hence programatically modifying the setup.
0
 
LVL 5

Expert Comment

by:tomasX2
ID: 12089130
Let´s say a web server is setup up to have multiple sites but when you install your msi it goes to the one that is setup in the default web site.
Are you trying to set which web site to install your application to?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 10

Expert Comment

by:ptmcomp
ID: 12091156
Is it a web setup project? I think they let you choose the path.
0
 
LVL 5

Expert Comment

by:tomasX2
ID: 12092264
They let you choose the path.... but the virtual directory still gets installed to the default web site.
0
 
LVL 5

Expert Comment

by:tomasX2
ID: 12095183
Correction
I think they only let you choose the name of the virtual directory.... but the virtual directory still gets installed to the default web site.
0
 

Author Comment

by:ardolino
ID: 12101686
no. this is not a web setup project.  it is a windows setup project.  The setup project installs a windows service which in turn will setup and create a web site based upon the user's selection.

There are lots of other sections on the windows setup project, such as file locations, registry, etc.  Each one of these items has a PROPERTY name.  My question is this - is there any way to modify these properties programatically, or can you only pass them into the installer class as parameters?
0
 
LVL 5

Accepted Solution

by:
tomasX2 earned 1000 total points
ID: 12102017
Don´t think you can do it... at least not without some hacking... I think the custom actions vs.net allows you to add are deferred action custom actions... although I´m not 100%
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/how_do_i_access_the_current_installer_session_from_inside_a_custom_action.asp
0
 

Author Comment

by:ardolino
ID: 12111554
Thank you tomasx2, this answers my question.
0
 
LVL 5

Expert Comment

by:tomasX2
ID: 12111560
Glad to help... good luck.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question