<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML lang="en">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<link href="style.css" rel="stylesheet" type="text/css">
<title>3.8.1. Predefined (read-only) variables</title>
<script src="show_matches.js" type="text/javascript"></script>
</HEAD>
<BODY>
<h3>3.8.1. Predefined (read-only) variables</h3>
<p>NppExec supports all basic (predefined) environment variables of Notepad++ plus several its own (predefined) environment variables. See NppExec's help <a href="3.1.html">[3.1]</a> for more details about supported predefined variables.</p>
<p>Consider such predefined environment
    variables as &quot;read-only&quot;: you can use these variables in NppExec's commands
    and scripts,
but can not modify their values.</p>
<p>These variables exist in NppExec's commands and scripts - actually, these variables are replaced with their current values by NppExec when you use them. These variables do not exist outside of NppExec (do not exist for child processes and so on). It means you can't use such variables as $(FULL_CURRENT_PATH), $(NPP_DIRECTORY), $(#1) and so on inside external programs or tools. However, you can:</p>
<p>1) pass the values of these variables as input parameters of external programs/tools, e.g. </p>
<blockquote>
  <pre>// pass &quot;$(FULL_CURRENT_PATH)&quot; as a parameter of tcc
tcc -run &quot;$(FULL_CURRENT_PATH)&quot;</pre>
</blockquote>
<p>2)
      use the command &quot;env_set&quot; to create a heritable environment variable <a href="3.8.3.html">[3.8.3]</a>
  which will be accessed inside external programs/tools, e.g.</p>
<blockquote>  
  <pre>// create new environment variable NPPHOME
ENV_SET NPPHOME = $(NPP_DIRECTORY)
// start cmd.exe
cmd</pre>
</blockquote>
<p>Now
      you can type something similar to &quot;echo %NPPHOME%&quot; inside cmd in order
    to use the value of this environment variable.</p>
</BODY>
</HTML>
