I think you painted yourself quite nicely in the corner with these strict requirements (what's wrong with "screwing with the registry
Luckily there are some Windows (ahem) to escape through :-)
A few of them are already mentioned, but be aware that using "regular" TCC as a pass-through might cause global aliasses, functions, etc to "leak" into your TCC-RT and cause unpredictable results.
I can think of quite a few other ways to solve this, but most of them are not very "1991" as they require advanced registry trickery.
Here are the more straightforward ones that you might consider:
Visible differences between TCC and TCC-RT
This is the most straighforward one: put a BEEP and a PAUSE in the tcstart.btm of TCC-RT, use different screencolours, etc so you know
you are using the testversion and can change the file association if neccessary.
The titlebar gives you this information also, but that might be overlooked (or changed).
CMD as a switchboard
This one requires you to change the registry once.
Basically it associates .BTM files with a .CMD script (not CMD.exe ... a CMD script).
Then that script decides on criteria you specify (environment variable, flag file,...) what to start: TCC or TCC-RT
The CMD-script (based on my current paths and versions; tailor those to your situation):
IF exist c:\temp\RT.txt (
start "TCC RT 20" "C:\Temp\TEST_TCMD\CompleteVersies\RT_20.11.41\tcc.exe" /C %*
) ELSE (
start "TCC 20" "C:\Temp\TCMD20\tcc.exe" /C %*
Add this to your registry (Again: tailor to your situation):
Windows Registry Editor Version 5.00
@="\"C:\\Temp\\TEST_TCMD\\FLIP.CMD\" \"%1\" %*"
Side-effect: FTYPE always shows the command specified in the default "Open" key, so it will report the wrong association. I could re-use the "Open" keyword, but that is where Take Command installations write. This way it can't be accidentally overwritten.
Now, if you double-click a .BTM in explorer, FLIP.CMD will be started (you can see that window flash very shortly on your screen) and that will start the correct TCC.exe.
A flipswitch on your desktop that changes and shows the current association state
( Based on [title]
This one changes the registry everytime, but shows you the state it is in (TCC or TCC-RT)
- Put this script somewhere on your system
- Change the settings in the script
- Start it once.
- It will create an icon on your desktop.
- From now on you can doubleclick this icon to switch between TCC an TCC-RT. The icon shows you the current association (green=TCC; red=TCC-RT)
If you remove the current TCC (-RT) version and install another one, the script will alert you (and show an exclamation mark icon too, to make you aware you have to change the settings.
The script uses FTYPE. You could also use FTYPE /U to change the setting in userspace
::==============[ SETTINGS ]===================
set LINKNAME=TCC association
::==============[ END SETTINGS ]===============
rem assoc .btm=TCC.Batch
ftype TCC.Batch="%TCCRT%" /c "%%1" %%*
SHORTCUT "%_batchname" "" "" "TCC Flip" "%USERPROFILE%\Desktop\%LINKNAME.lnk" 1 "C:\Windows\System32\imageres.dll" 100
echo. Don't forget to close all TCC's first
echo. to prevent "leaking" of global aliasses and other settings
rem taskkill ....
ftype TCC.Batch="%TCC%" /c "%%1" %%*
SHORTCUT "%_batchname" "" "" "TCC Flip" "%USERPROFILE%\Desktop\%LINKNAME.lnk" 1 "C:\Windows\System32\imageres.dll" 101
echo. "%_cmdspec" is not one of the options!
echo. Current options:
echo. Update this script (%_batchname)
SHORTCUT "%_batchname" "" "" "TCC Flip" "%USERPROFILE%\Desktop\%LINKNAME.lnk" 1 "C:\Windows\System32\imageres.dll" 102
Good luck and have fun!