Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

How to determine whether VS is installed?


  • Please log in to reply
5 replies to this topic

#1 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 27 September 2012 - 08:38 PM

Hi all! I'm currently writing a Windows application where I need to programmatically make sure Visual Studio is installed before performing certain tasks. Do any of you guys know of robust ways for doing this? Bonus question: Do you also know how to determine the version of the VS instance installed.

#2 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 27 September 2012 - 09:17 PM

You can probably scan the registry keys in the KKEY_CLASSES_ROOT hive and look for the ProgID (in quotes below):

  • Visual Studio .NET 2002: "VisualStudio.DTE.7"
  • Visual Studio .NET 2003: "VisualStudio.DTE.7.1"
  • Visual Studio 2005: "VisualStudio.DTE.8.0"
  • Visual Studio 2008: "VisualStudio.DTE.9.0"
  • Visual Studio 2010: "VisualStudio.DTE.10.0"


#3 nakchak

nakchak

    Advanced Member

  • Members
  • PipPipPip
  • 404 posts
  • LocationBristol, UK

Posted 27 September 2012 - 09:51 PM

As Dave suggested scan the registry more info here: http://blogs.msdn.co...tudio-2010.aspx although its targeting visual studio 2010 its a virtually identical process for prior versions Depending on how robust a check you want to do you could also check the file system, although the registry should suffice. Nak.

#4 Anthony Glenwright

Anthony Glenwright

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts

Posted 28 September 2012 - 03:37 AM

Does this help? http://www.mztools.c.../MZ2008003.aspx

#5 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 28 September 2012 - 05:20 AM

Wow, four replies within hours. Thanks guys, I'll have a look at it all when I get home from work this evening.

#6 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 29 September 2012 - 01:08 AM

Thank you guys, I think I'm pretty much covered now.

You can probably scan the registry keys in the KKEY_CLASSES_ROOT hive and look for the ProgID....

Thanks Dave, this is what an excerpt of my registry looks like. Funny thing is that, even though I've got VS 2010 Express installed, it doesn't actuall show or does it?. Explanation to be found among the other answers I think.
Attached File  vs.PNG   6.3KB   3 downloads

As Dave suggested scan the registry
more info here: http://blogs.msdn.co...tudio-2010.aspx although its targeting visual studio 2010 its a virtually identical process for prior versions...

Great, thanks!

Does this help? http://www.mztools.c.../MZ2008003.aspx

Yes, very much so. I think I got what I need to suffice now.

As said, I'm building a Windows app and it will rely on VS for compilation and (foremost) Visual Studio Express since its free which is great. Generally, I think MS is much more on the right track now than they used to be and it won't surprise me a bit if they, eventually, will win the "war" against the fruit company when it comes to handhelds, tablets and all that - but that's only my personal guessPosted Image

Oh, and btw I found this article on "IP obesity" very interesting:
http://www.sparkfun.com/news/963




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.