Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / June 2006

Tip: Looking for answers? Try searching our database.

Path to devenv.exe

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WALDO - 07 Jun 2006 15:56 GMT
How can I get the path to devenv.exe, given applicationObect As DTE,
addInInstance As AddIn?
Signature


Any help is appreciated.
Thanks in advance.

WALDO

kehlar - 07 Jun 2006 18:04 GMT
I'm not sure if you can get it via DTE, but it's stored in the registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\devenv.exe

> How can I get the path to devenv.exe, given applicationObect As DTE,
> addInInstance As AddIn?
WALDO - 07 Jun 2006 18:47 GMT
Hmm, that doesn't help because I have multiple versions of VS installed. I'm
trying to get at the one that is actually hosting the add-in.

Really and truly, I'm trying to get a path to the Common7\Tools directory
and the SDK directory

Signature

Any help is appreciated.
Thanks in advance.

WALDO

> I'm not sure if you can get it via DTE, but it's stored in the registry
> key:
[quoted text clipped - 3 lines]
>> How can I get the path to devenv.exe, given applicationObect As DTE,
>> addInInstance As AddIn?
Dustin Campbell - 07 Jun 2006 18:53 GMT
Have you tried DTE.FileName?

Best Regards,
Dustin Campbell
Developer Express In
"Ed Dore" - 07 Jun 2006 22:50 GMT
In addition to Dustin's suggestion, I suspect he meant DTE.FullName, you
can also pull this from the registry. Just look for the InstallDir value
under HLKM\Software\Microsoft\VisualStudio\8.0.

If by chance you run that addin in more than the retail hive, you can
programatically retrieve the registry key by way of DTE.RegistryRoot, and
query the InstallDir value to get to the appropriate ....\Common7\IDE
directory.

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
WALDO - 08 Jun 2006 18:06 GMT
Thanks Ed. That's what I was looking for. I guess once I have that, I can
use IO.DirectoryInfo to get me the parent directory (Common7) the combine it
with Tools, then I can get the parent's parent's directory and combine it
with "SDK\v", the framework version (also pulled from the registry [with the
"v" removed]), and "\bin"

Signature

Any help is appreciated.
Thanks in advance.

WALDO

> In addition to Dustin's suggestion, I suspect he meant DTE.FullName, you
> can also pull this from the registry. Just look for the InstallDir value
[quoted text clipped - 9 lines]
>
> This post is 'AS IS' with no warranties, and confers no rights.
Dustin Campbell - 08 Jun 2006 18:25 GMT
> Thanks Ed. That's what I was looking for. I guess once I have that, I
> can use IO.DirectoryInfo to get me the parent directory (Common7) the
> combine it with Tools, then I can get the parent's parent's directory
> and combine it with "SDK\v", the framework version (also pulled from
> the registry [with the "v" removed]), and "\bin"

Note that you can also use Environment.Version to retrieve the current .NET
Framework version.

Best Regards,
Dustin Campbell
Developer Express In

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.