By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done System variable with TCC folder path

Have the installer create a system variable with the TCC folder path so other programs that require a full path can access it without the full path being hard coded, just %TCC_Dir%\tcc.exe (I do realize I can create one myself, but then it's "not standard".)

(I've just started doing a little bit with VBA and tried CALL Shell(). It works with the full path of an .exe but when I put in the full path of a .btm it doesn't accept it. I assume I'll need to include the path to tcc.exe.)
Use %ComSpec% to refer to the current interpreter.
And read documentation before assuming anything.
Either you don't have .BTM association, or you did not adjust PATHEXT to execute .BTM by the default shell.
I'm not looking to use whatever happens to be the current interpreter. What happened is I have both TCC/TCMD 21 and 22 installed. Instead of hardcoding the path for a particular TCC version I want to be able to use a system variable.

As I indicated, I know how to add a system variable, which I did. But that's one more custom step that has to be done with each install. I was able to screw with the VBA and get it to work--but I still think it's a good idea to have the system variable, especially when there are multiple TCC versions installed (TCC 21, TCC 22, TCC-RT).

(And the VBA didn't work with the system variable--but I didn't spend much time on it and it really doesn't matter for my purposes.)
Your purposes are uncommon - having multiple versions (or architectures) of the same program installed is a power user feature.
Having TCC-RT installer alongside other TCC variants is even more questionable. I suggest you use a VM if you want to run your scripts in TCC-RT for tests; that will be a more correct testing experience.
You're assuming I'm a developer with a power user machine. I'm not--I'm a lawyer (with no particular programming background ...) and the small firm still uses some DOS software, so we're limited to 32-bit Windows on 2009-era PC's. Plus, VM's would require multiple licenses for other software, etc., and be far beyond my abilities.
VirtualBox is free, and you can use trial versions of software for testing purposes. (This is, after all, what trial versions are for.)
And many "2009-era" systems have hardware virtualization support.
%@PATH[%_CMDSPEC] returns that information. If you need to do it in a CMD.EXE-compatible way, use %COMSPEC%\..\


FOR %%F IN ("%ComSpec%") DO (
  SET CS_DIR=%%~dpF


[C:\temp]$ xx.cmd

[C:\temp]$ xx.btm

Similar threads