Инструменты пользователя

Инструменты сайта


en:autorun:documentation2x:setenv

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

varName of the variable.
textText of variable. May contain other variables and environment variables.

Switches

/EV-Disables the use of variables and environment variables in the text.
/EEEnables the use escapes (\n, \r, \t) in the text.
Appends a text to exising variable text (replacing instead). See remarks.
/АDThe same as /A, but allow duplicating. See remarks.

Related

GetEnv, Set

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.

en/autorun/documentation2x/setenv.txt · Последнее изменение: 2020/09/17 18:06 — 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki