Solved

Custom Folders (.NET Install)

Posted on 2004-09-17
10
214 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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 250 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now