Environment Variable

<< Click to Display Table of Contents >>

Navigation:  PDF-XChange Standard V7 User Manual > Printer Settings > Macros >

Environment Variable


 

Main-Image Environment Variable

 


 

The Environment Variable macro adds information taken from user-specified variables. This macro must be qualified with a parameter in order to return information.

 

 

The syntax for this macro is %[Env:<Parameter>] and the following parameters are available:

 

Parameters

 

ALLUSERSPROFILE inserts the full path to the All Users profile directory.

APPDATA inserts the full path to the Application Data directory of the current user.

CommonProgramFiles inserts the full path to the Common Files directory.

CommonProgramFiles(x86) inserts the full path to the (x86) Common Files directory in 64-bit versions of Windows.

CommonProgramFilesW6432 inserts the full path to the Common Files directory in 64-bit versions of Windows.

COMPUTERNAME inserts the computer name.

HOMEDRIVE inserts the drive letter on the local computer that is connected to the user's home directory.

HOMEPATH inserts the complete path of the current user's Home directory, as defined by the user's account properties.

LOCALAPPDATA inserts the complete path to the current user's Application Data directory.

LOGONSERVER inserts the name of the domain controller that authenticated the client's logon request.

OS inserts the name of the operating system.

PROCESSOR_ARCHITECTURE inserts the chip architecture of the CPU.

ProgramData inserts the full path to the All Users profile directory.

ProgramFiles inserts the full path to the Program Files directory.

ProgramFiles(x86) inserts the full path to the (x86) Program Files directory in 64-bit versions of Windows.

ProgramFilesW643 inserts the full path to the Program Files directory in 64-bit versions of Windows.

PUBLIC inserts the full path to the Public directory.

SESSIONNAME inserts the session name and number when a client is connected via a terminal server.

SystemDrive inserts the name of the drive on which the system folder was placed.

SystemRoot inserts the name of the system folder.

TEMP inserts the name of the default temporary folder used by the operating system and applications available to the current user.

TMP inserts the name of the default temporary folder used by the operating system and applications available to the current user. (Note that some applications require the TEMP environment variable, whilst others require TMP. The values for both should be identical).

USERDOMAIN inserts the name of the user domain that contains the account of the current user.

USERDOMAIN_ROAMINGPROFILE inserts the name of the user domain for RDS or standard roaming profile paths.

USERNAME inserts the name of the current user.

USERPROFILE inserts the location of the current user's profile directory.

windir inserts the full path to the Windows directory.

 

Example

 

Follow the steps below to use the Environment Variable macro to create a watermark from the full path to the Common Files directory:

 

1. Click Watermarks in the settings menu, then click Add:

 

macro.appname.1

Figure 1. Watermarks Settings Dialog Box, Add Watermark Button Highlighted

 

The Add/Edit Watermark dialog box will open.

 

2. Clear the Text text box, then click the macro icon and click Environment Variable in the dropdown menu:

 

macro.env.example

Figure 2. Add/Edit Watermark Dialog Box, Environment Variable Macro Selected

 

The %[Env] macro is then added to the text box.

 

3. Add the text ":CommonProgramFiles" to the macro.

 

The watermark text will update to the full path to the Common Files directory:

 

env.macro.example

Figure 3. Add/Edit Watermark Dialog Box, %[Env:CommonProgramFiles] Macro Example