Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to configure Windows 7 to open every new .txt file into the first of the existing TextPad instances.

I know how to open new files all into a single TextPad instance but I am trying to avoid disabling multiple instances.

Instead, if multiple instances are open, open the new file in the first (or last, if it can be configured) instance.

I remember it used to be able to be done in Win2K and Windows XP under File Associations and there was something like a command options field where there was specific syntax that enabled this. So back then, I was indeed able to perform this functionality.

share|improve this question
    
I guess this would require some sort of custom script/program, which would compare the PIDs of the instances and open the file in the one with the smallest PID. –  Karan Sep 21 '12 at 20:04
    
it was simpler than that in Win2K, it was just command line options –  amphibient Sep 21 '12 at 20:46
    
Are you sure this was an out of the box feature, and not using some 3rd party utility? I'd actually love to know more about this and how it worked under Windows 2000, i.e. what options were used to specify the particular instance required. –  Karan Sep 21 '12 at 21:04
add comment

1 Answer

I don't remember where I found this, but you can modify your registry to get this working. I've tested it with both TextPad 5 & 6, and it works.

Here's what regedit exports:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec]
@="[open(\"%1\")]"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec\application]
@="TextPad.6"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec\IfExec]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\TextPad.exe\shell\open\ddeexec\topic]
@="System"

You should be able to import the above if you save it as a .reg file, or you can do it manually. If you're using TextPad 5, you need to change the value of the "application" key to "TextPad.5.0"

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.