Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Getting Install Root Path For Web Installer

Posted on 2005-03-18
Medium Priority
Last Modified: 2012-06-27
In my installer I tweak the web.config file settings based on values input in one of the installer dialogs.

Right now I assume "C:/Inetpub/wwwroot/" + virtualDirectoryName + "/web.config" where virtualDirectoryName is the passed value of "TARGETVDIR" in a custom action, but I'm hoping to find a more robust methodology (that will account for virtual directories somewhere other than Inetpub/wwwroot).

I tried looking at "TARGETDIR" but it ended up being the System32 folder or something (not what I wanted). Is there a way to get at the install root?
Question by:boulder_bum
  • 3
LVL 15

Expert Comment

ID: 13576676
r u talking about Request.Phyicalapplicationpath
LVL 12

Accepted Solution

laotzi2000 earned 1500 total points
ID: 13576865
What language do you use in your custom action?

But whatever, I think this will work.
Search for registry key value HKLM\Software\Microsoft\Inetstp\PathWWWRoot

Author Comment

ID: 13579365

Unfortunately I don't have access to the Request object at install-time.



I'll check your suggestion out, thank you.

Author Comment

ID: 13608321
Hey laotzi,

Thanks for that, it certainly helps, but it's slightly imperfect. That key looks like the default installation directory for ALL web apps, but it won't necessarily install there under certain circumstances (if I have a virtual directory that runs on a different port and doesn't use the default install root, for example).

It seems like there HAS to be a way to get at the install root. After all, the installer itself has to know where to put the files. Has anyone else checked this out before?

Author Comment

ID: 13731784
I couldn't figure anything else out, so I went with that suggestion (and prompted the user if the file wasn't found).

Thanks again, man!

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

577 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