<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pete Sheill : BgInfo</title><link>http://blogs.msdn.com/psheill/archive/tags/BgInfo/default.aspx</link><description>Tags: BgInfo</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Customizing BgInfo to include the installed runtimes</title><link>http://blogs.msdn.com/psheill/archive/2009/04/01/Customizing-BgInfo-to-include-the-installed-runtimes.aspx</link><pubDate>Wed, 01 Apr 2009 20:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9527514</guid><dc:creator>psheill</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/psheill/comments/9527514.aspx</comments><wfw:commentRss>http://blogs.msdn.com/psheill/commentrss.aspx?PostID=9527514</wfw:commentRss><description>&lt;P&gt;Almost without exception, Windows developers use the tools from Sysinternals such as Process Explorer.&amp;nbsp; Another one that I've recent adopted is &lt;A class="" href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx" mce_href="http://technet.microsoft.com/en-us/sysinternals/bb897557.aspx"&gt;BgInfo&lt;/A&gt;, which displays&amp;nbsp;useful system info on your desktop to save time and help distinguish multiple machines (Hyper-V users, you know what I mean).&amp;nbsp; I often find myself checking to see which .NET Runtimes are installed on a machine.&amp;nbsp; Standalone, BgInfo doesn't include any information about runtimes, but it does allow for customization, and that's what inspired this post.&amp;nbsp; I wrote a small script that will list the runtimes it finds installed on your system - when called by BgInfo, the runtime versions will be displayed on the desktop.&amp;nbsp; To use, just create a file called "runtimes.vbs" with the following contents.&amp;nbsp; Then run BgInfo, press the "Custom" button, "New", type ".NET Runtimes" for the Identifier, select "VB Script file" and enter the path of the runtimes.vbs file.&amp;nbsp; Running BgInfo from your startup folder keeps the information up-to-date.&lt;/P&gt;&lt;PRE&gt;'
'Script to print out the installed .NET runtimes in the system
'
set fso = CreateObject("Scripting.FileSystemObject")
set WSHShell = CreateObject("WScript.Shell")
windir = WSHShell.ExpandEnvironmentStrings("%windir%") 
frameworkDir = windir + "\\Microsoft.net\\framework"
if fso.FolderExists(frameworkDir) then
    set installRoot = fso.GetFolder(frameworkDir)
    set frameworkFolder = installRoot.SubFolders
    for each f1 in frameworkFolder
        ' Look for folders that have the .NET runtime binaries or compilers in them
        if fso.FileExists(f1 + "\\mscorwks.dll") or fso.FileExists(f1 + "\\clr.dll") or fso.FileExists(f1 + "\\csc.exe") then
        echo f1.name
      end if
    next
end if
set fso = nothing
set installRoot = nothing
set frameworkFolder = nothing
&lt;/PRE&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9527514" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/psheill/archive/tags/BgInfo/default.aspx">BgInfo</category><category domain="http://blogs.msdn.com/psheill/archive/tags/clr/default.aspx">clr</category></item></channel></rss>