Click here to Skip to main content
12,560,241 members (58,866 online)
Click here to Skip to main content
Add your own
alternative version


14 bookmarked

Small Registry Tweaker for VS.NET Associated Files

, 22 May 2003
Rate this:
Please Sign up or sign in to vote.
Make VS.NET files open in the open instance of VS.NET instead of a new instance

Sample Image - VSNetRegHelper.jpg


Don Box Commented about the fact that when he double clicks VS.NET associated files in his explorer, Those files are opened using a new instance of VS.NET, even though there is an existing instance of the editor. He also pointed out a way in which to make those files load within the active instance of the VS.NET. It is done by adding a simple suffix to the value of registry keys associated with those files in the registry.

However, This process is very cumbersome. So I decided to make a program solely for this purpose. This program can be customized to change a user defined registry key, and an xml list of files that will be changed. The user can also revert this process.

The configuration of which file types are to be changes in the registry is done using the FileTypes.xml file located in the program directory. Configuration of where to look within the registry for those files is done via the appSettings section of the app.config file. You are also able to see the current values of the keys mentioned before and after you change their value.

How it's done:

I'll quote Don here:

Tarek from the VS team just gave me the magic incantation to tweak the shell integration of VS.NET.

My problem has been that when you ShellExecute a source file (that is, double-clicking or using Start->Run), a new devenv.exe instance gets launched. Yes, VS.NET 2003 starts faster than 2002 did, but no where near fast enough to edit or view a simple file.

Here's the tweak to get ShellExecute to use an existing instance of devenv.exe (if one exists):

Change the following registry key:

@="\" C:\\...\\devenv.exe \ " /dde

to this:

@="\" C:\\...\\devenv.exe \ " /dde \"%L\"

If you are using the RegEdit.exe UI, this means finding the registry key and adding a "%L" after the /dde switch.

Also note that you need to do this for each file type you want to work this way. The specific key shown here is for .CS files. Fortunately, all of the file types are near one another in RegEdit.exe.

I found that on my computer, however, these locations appear at different keys:

[HKEY_CLASSES_ROOT\vbfile\shell\Open.VisualStudio.7.1\command] .

and so on...

I show a simple use of the Registry Classes and not really much more. Really simple. This was made solely for the purpose of allowing you to configure your registry fast with the out-of-the-box mentions file types (such as cs or vb)

I must say that the problem does not occur on my computer, And also my registry keys do not hold the solution mentioned by don box, so I don't really know how it works without them, but it does (Perhaps it's because he is using VS.NET 2003 and i'm using 2002). That's why the changes to the registry are fully customizable and allow you to change where and what the actual values are.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Roy Osherove
Web Developer
Israel Israel
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralPlease post the source Pin
ToothRobber27-May-03 4:38
memberToothRobber27-May-03 4:38 
GeneralRe: Please post the source - Fixed? Pin
Roy Osherove28-May-03 8:00
memberRoy Osherove28-May-03 8:00 
GeneralSource does not exists... :-((( Pin
ptap3-May-03 11:48
memberptap3-May-03 11:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161026.1 | Last Updated 23 May 2003
Article Copyright 2003 by Roy Osherove
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid