none
How do I change the default 'open' behavior when double-clicking on a file in Windows 7? RRS feed

  • Question

  • This one's relatively minor, but it always annoys me, so I'm hoping it's still possible somehow.

    Excel 2003 by default opens a second spreadsheet as part of the same process as the first, so if you click on the red 'X', you close both, not the one.  I'm always forgetting this.  I'd like to find a way to do this trick from XP in Windows 7 that opens them as separate processes:

    http://blog.drewery.net/2006/08/29/utilising-dual-monitors-with-microsoft-excel-2003/

    Any help?  Any way of editing in Win7 what was on the File Types tab in XP?  TIA
    • Edited by Robinson Zhang Tuesday, May 19, 2009 9:45 AM as customer request
    Monday, May 11, 2009 8:59 PM

Answers

  • I know this thread was started over a year ago now but it popped up high on my Google search for how to change open with behavior, so maybe I can help answer this now that I found a solution.

     

    Jgallott,

    As far as I know there is nothing similar in functionality to all the options you had in the file types tab of Windows XP. You can however get similar functionality using a combination of Windows 7 “Default Programs” and regedit.

    First, although I don’t think you need to do this in your case but, just as a general tutorial, you need to associate the file type with the program that you want to open the file with. In Windows 7 this can be done with “Default Programs”. Just go to start menu \ Default Programs. It’s also in the control panel under the Programs category if you are in category view.

    In the window that opens up choose “Associate a file type or protocol with a program”

    This will bring up a window that looks a lot like the File Types Tab in Windows XP, but here you still don’t have all the functionality of XP. What you can do is find the extension of the file type you want to associate and select it. Click “Change Program”. If the “Open With” window does not already have the program you want to associate with that file type in it you can click browse and then navigate to the executable of the program that you want and select it.

    Note, my examples show Daemon Tools Lite since it was not mounting images with a double click like it should.

    Now you have the file type associated with the right program.

     

    Next is the part that you are interested in Jgallott.

    The usual disclaimers here about not messing with regedit unless you know what you are doing because you can really mess up your computer if you change something wrong.

    Open regedit (start menu, search for regedit click regedit.exe, or window key + r to open the run command and type regedit)

    Navigate to “HKEY_CLASS_ROOT\Applications”

    Find the key for the executable you are using in my case DTLite.exe. Drill down to the command key.

    Ex: HKEY_CLASS_ROOT\Applications\DTLite.exe\shell\open\command

    There should be a “(Default)”, REG_SZ string there that looks like the <path>/<executable> followed by the command line arguments to make the open operation work. By default it should look something like this

    "C:\Program Files\DAEMON Tools Lite\DTLite.exe" "%1"

    Now this argument will work for most executables to open a file but some, like DTLite.exe need additional arguments. Just edit the string to reflect the proper command line syntax to make the program work. Ex…

    "C:\Program Files\DAEMON Tools Lite\DTLite.exe" -shellmount "%1"

     

    For other examples just look at some of the other executables under HKCR\Applications. They all have about the same structure.

    Also note if you want to associate a file type with a standalone executable that did not install and therefore does not have an entry in the registry you can insert the proper keys into the registry. Just follow the structure of the other executables there it should look like this

      HKCR\Applications\<executable.exe>\shell\open\command

    (Default)              REG_SZ                                “<path>\<program.exe>” (arguments) “%1”

    Many people have found that their file associations no longer work if they have moved an executable from where they installed it at. This is because the registry has not been updated with the new path and re-associating the file type does not fix this. In this case just update the path in the string under the command key.

     

     

    Another little trick that could be useful for your specific question about Excel though:

    If you right click on a program that’s on the task bar and then click on the program name there you will open up a new instance of that program. It even works for programs like Excel and Outlook that normally only let you have one instance running at a time.

     

    Sorry for the really long post but I hope this helps.

     

    • Proposed as answer by Corvidweb Wednesday, June 9, 2010 5:10 PM
    • Marked as answer by jgallott Wednesday, June 9, 2010 7:39 PM
    Wednesday, June 9, 2010 5:07 PM
  • Corvidweb, you have become my hero for the day.

    The location for Excel 2003 was HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command; appended '<space>"%1"' (without the single quotes) to both dwords in there.

    THEN go to HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec; the Default dword says '[open("%1")]', delete this and leave dword blank.

    Not sure of any repercussions, but now it seems to be working as I wanted, just as it did under XP.

    Edit 3/7/2012-

    I kept having to redo this fix, it seemed to get reversed every time Excel got an update (not sure of the specific cause, maybe it was just from rebooting, which generally only happened when updates were applied).  The last time I corrected it, I changed the permissions for System from Full Control to Read on  HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command and HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec and have not had to redo the registry changes since.

    • Marked as answer by jgallott Wednesday, June 9, 2010 7:39 PM
    • Edited by jgallott Wednesday, March 7, 2012 5:16 PM
    Wednesday, June 9, 2010 7:39 PM

All replies

  • Hi,

    This is not a Window 7 issue, it is an Excel issue in how it handles multiple document windows. You can use “View / Arrange all / Vertical” to view two excel document as a workaround.

    Thanks.

    Wednesday, May 13, 2009 7:07 AM
  • Actually, it is a Windows 7 issue.  The workaround in the link depends on being able to get to the 'File Types' tab in Folder Options and open the 'Actions', particularly the 'Open' action for the .xls extension.  That tab is not in Windows 7.  The question is, is there an alternative way to get to the functionality that was in XP (changing the Open behavior for an extension)?

    The problem is not viewing two Excel windows (that's dead easy), it is having the two windows open as separate processes so closing one doesn't close the other.  Opening Excel twice and using File --> Open will run them in two processes, but is quite awkward.  The method in the link makes starting in a new process the default when double-clicking a file, and is quite handy.
    Wednesday, May 13, 2009 1:01 PM
  • Hi Jgallott,

     

    Please understand the symptom is by designed on Microsoft Office’s side. The workaround in Windows XP is force Excel to open two separate windows. It is not a Windows issue(Windows XP and Windows 7).

     

    I do not know why they design it since it’s control by Product Team. I suggest you post the question on Office Discussion Groups. The reason why we recommend posting appropriately is so you will get the most qualified pool of respondents.

     

    Thank you for your understanding.

    Friday, May 15, 2009 10:27 AM
  • Perhaps my error was in using 'what I was trying to do' as the title for the thread rather than 'what I was asking for'.  I apologize for using the word 'Excel', since it seems to be causing confusion.  I know exactly what I want to do, and am not arguing that the default behavior of Excel should be different.  I will not refer to that component of Microsoft Office Suite again in this thread, since it is irrelevant except as background to why I was asking the real question.

    Pretend that I had been smart enough to title this thread:

    "How do I change the default 'open' behavior when double-clicking on a file in Windows 7?"  (If some Admin could actually change the title to reflect this, I would be eternally grateful)

    All I have been able to find in Windows 7 is an incredibly dumbed-down ghost of the 'File Types' tab in WinXP.  I will grant that there was some very powerful stuff in that tab, and that making access to it by the average user more difficult is not completely a bad thing.  I am hoping that it is not completely inaccessible, since on rare occasions it is useful to have access to it.

    Is there another way to access the 'File Types' tab functionality in Windows 7?  If not, is there a utility (Microsoft or third party) that will give access?  Or has access truly been locked out and I am, in essense, making a Feature Request?
    Monday, May 18, 2009 4:35 PM
  • Did you install the latest Office Updates(include SP1)?
    Thursday, May 21, 2009 11:50 AM
  • Not an Office issue.  All updates to Office applied.  Repeat: not an Office issue.  If Microsoft took basic OS functionality away, that's one thing.  But Office is not the issue.
    Tuesday, November 17, 2009 8:07 PM
  • I know this thread was started over a year ago now but it popped up high on my Google search for how to change open with behavior, so maybe I can help answer this now that I found a solution.

     

    Jgallott,

    As far as I know there is nothing similar in functionality to all the options you had in the file types tab of Windows XP. You can however get similar functionality using a combination of Windows 7 “Default Programs” and regedit.

    First, although I don’t think you need to do this in your case but, just as a general tutorial, you need to associate the file type with the program that you want to open the file with. In Windows 7 this can be done with “Default Programs”. Just go to start menu \ Default Programs. It’s also in the control panel under the Programs category if you are in category view.

    In the window that opens up choose “Associate a file type or protocol with a program”

    This will bring up a window that looks a lot like the File Types Tab in Windows XP, but here you still don’t have all the functionality of XP. What you can do is find the extension of the file type you want to associate and select it. Click “Change Program”. If the “Open With” window does not already have the program you want to associate with that file type in it you can click browse and then navigate to the executable of the program that you want and select it.

    Note, my examples show Daemon Tools Lite since it was not mounting images with a double click like it should.

    Now you have the file type associated with the right program.

     

    Next is the part that you are interested in Jgallott.

    The usual disclaimers here about not messing with regedit unless you know what you are doing because you can really mess up your computer if you change something wrong.

    Open regedit (start menu, search for regedit click regedit.exe, or window key + r to open the run command and type regedit)

    Navigate to “HKEY_CLASS_ROOT\Applications”

    Find the key for the executable you are using in my case DTLite.exe. Drill down to the command key.

    Ex: HKEY_CLASS_ROOT\Applications\DTLite.exe\shell\open\command

    There should be a “(Default)”, REG_SZ string there that looks like the <path>/<executable> followed by the command line arguments to make the open operation work. By default it should look something like this

    "C:\Program Files\DAEMON Tools Lite\DTLite.exe" "%1"

    Now this argument will work for most executables to open a file but some, like DTLite.exe need additional arguments. Just edit the string to reflect the proper command line syntax to make the program work. Ex…

    "C:\Program Files\DAEMON Tools Lite\DTLite.exe" -shellmount "%1"

     

    For other examples just look at some of the other executables under HKCR\Applications. They all have about the same structure.

    Also note if you want to associate a file type with a standalone executable that did not install and therefore does not have an entry in the registry you can insert the proper keys into the registry. Just follow the structure of the other executables there it should look like this

      HKCR\Applications\<executable.exe>\shell\open\command

    (Default)              REG_SZ                                “<path>\<program.exe>” (arguments) “%1”

    Many people have found that their file associations no longer work if they have moved an executable from where they installed it at. This is because the registry has not been updated with the new path and re-associating the file type does not fix this. In this case just update the path in the string under the command key.

     

     

    Another little trick that could be useful for your specific question about Excel though:

    If you right click on a program that’s on the task bar and then click on the program name there you will open up a new instance of that program. It even works for programs like Excel and Outlook that normally only let you have one instance running at a time.

     

    Sorry for the really long post but I hope this helps.

     

    • Proposed as answer by Corvidweb Wednesday, June 9, 2010 5:10 PM
    • Marked as answer by jgallott Wednesday, June 9, 2010 7:39 PM
    Wednesday, June 9, 2010 5:07 PM
  • Oh, tantalizingly close, but still can't get it quite to work.

    Excel isn't under 'applications', but listed by itself (minor prolem finding it, otherwise no big deal).  If you refer to the link in the initial post, the key (I think) is turning off DDE, not just putting the "%1" up with the command (at least putting the "%1" in didn't work.  Neither did /n).  I think it may be turning off DDE is the other key that I need.  Any idea how to do that?

    Knowing where to find the commands is good info anyway, Thanks.

    Wednesday, June 9, 2010 6:22 PM
  • Corvidweb, you have become my hero for the day.

    The location for Excel 2003 was HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command; appended '<space>"%1"' (without the single quotes) to both dwords in there.

    THEN go to HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec; the Default dword says '[open("%1")]', delete this and leave dword blank.

    Not sure of any repercussions, but now it seems to be working as I wanted, just as it did under XP.

    Edit 3/7/2012-

    I kept having to redo this fix, it seemed to get reversed every time Excel got an update (not sure of the specific cause, maybe it was just from rebooting, which generally only happened when updates were applied).  The last time I corrected it, I changed the permissions for System from Full Control to Read on  HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command and HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\ddeexec and have not had to redo the registry changes since.

    • Marked as answer by jgallott Wednesday, June 9, 2010 7:39 PM
    • Edited by jgallott Wednesday, March 7, 2012 5:16 PM
    Wednesday, June 9, 2010 7:39 PM