Solved

Custom Folders (.NET Install)

Posted on 2004-09-17
10
217 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exit the loop 4 43
Problem!!! 8 33
Getting error in connectionstring with Excel. 30 35
C# Gridview 1 33
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

831 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