# Open new file in TextPad using current instance, allowing for multiple instances

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.

-
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

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

@="[open(\"%1\")]"