Associating a file type with a specific application has always been fairly easy to do under the various incarnations of Windows. Basically, you can right-click on a file of the type you wish to use, select the Open With | Choose Program context menu option, then select the program like PrimalPad from the list or browse for the executable. Checking the “Always use the selected program to open this kind of file” permanently associates the “Open” verb with the selected file type.
But what if you don’t want to change the default association command? This happens frequently when the file type can be both edited and “executed”, as with a script file. What are your options then? In that case, a little registry manipulation is in order. As with any registry editing tasks, making changes to the registry can potentially damage your system. You should back up your registry before you make any changes.
Run Regedit and locate the registry key “HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell”. When you open that key you may already find several verbs in place, probably at least “Open” and maybe “Edit”. You can add your own verbs to the HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell. We will add the verb “Edit with PrimalPad” to this key.

Creating a new command
Right click on the HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell key and select the NEW | KEY context menu option. When the appears change its name to “Edit with PrimalPad” and press Enter. Now select the key you just created, right click and select NEW | KEY and name that new key “command”. Select the new “command” key. In regedit’s right hand pane, you should see a default string with its data set to “(value not set)”. Right click on the default string and select MODIFY from the context menu. Within the Edit String dialog, set the Value data to the following:
“<Path to PrimalPad>\PrimalPad.exe” “%1”
including the quotes, where <Path to PrimalPad> is your local path to the PrimalPad.exe file.

Edit with PrimalPad
There is one other thing that you need to keep in mind. Your file extension needs to be associated with the PerceivedType of “text” in order for the above to work right. So look for your file extension under HKEY_CLASSES_ROOT\; e.g. if your file extension is .ps1 look for
HKEY_CLASSES_ROOT\.ps1
Select that key (or create it if does not exist) and look at the PerceivedType string value. Make sure that it is set to “Text” or create that value if it does not exist.

PercievedType
At this point, everything should all be working and right clicking on your file should give you the “Edit with PrimalPad” option, which, when selected, should launch PrimalPad with your file as contents.