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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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