SetEnv
SetEnv [/A|/AD] [/EV-] [/EE] <var> <text>
Sets environment variable. Variable will be accesible only for current process and it's child processes.
If variable exists (inherited from parent process), command can change it, but changes will be accessible only for current process and it's child processes.
Parameters
var | Name of the variable. |
text | Text of variable. May contain other variables and environment variables. |
Switches
/EV- | Disables the use of variables and environment variables in the text. |
/EE | Enables the use escapes (\n, \r, \t) in the text. |
/А | Appends a text to exising variable text (replacing instead). See remarks. |
/АD | The same as /A, but allow duplicating. See remarks. |
Related
Remarks
When using /A parameter, plugin is checking if text at the end of variable's text the same as text being added, and not adding it repeatedly. This allow to avoid the case when text is repeatedly adding when you restart TC or unload plugin by cm_UnloadPlugins. If you still need to add text without this check, use /AD.
Usage example (was actual for TC < 8.0): place «noclose.pif» in TC folder and add this path to the PATH variable for current process, after that Shift+Enter command will work correctly without placing this file to windows directory (portable mode).
An environment variable name cannot contain the «=» symbol. If the name contains special characters, then the variable can be read only with the GetEnv command.