Solved

Custom Folders (.NET Install)

Posted on 2004-09-17
10
220 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

728 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