Setting user-based output directory with Environmental Variables

 

The environment variables can be created for different purposes in the Windows Operating systems. The Black Ice printer drivers can use these variables to set the printer output to different locations for different users. Windows also provides several useful predefined environment variables, E.g.: USERPROFILE or USERNAME.

 

Creating Environment variables

 

User Environment variables can be created in the “Start menu -> Control panel -> System -> Advanced system settings”. Choose the advanced tab and click on the “Environment Variables…” button. As shown below, one can create a variable name and set the path name as its value.

 

 

The Environment Variables window has two parts. The variables listed in the User variables section are unique to the currently logged in User or Administrator. The variables listed in the System variables section are system-wide and are visible to every user on the system.

 

To display the full list of environment variables that are available for the currently logged in user, use the “set” command in the command prompt.

 

Environment variables can also be nested together. E.g.:

In the Environment Variables dialog  the  TEMP variable is shown. This variable has the value of %USERPROFILE%\AppData\Local\Temp. So this variable also refers to another system variable USERPROFILE. If the TEMP variable is set in Printing Preferences > Filename Generation tab as the output directory, every user who prints to the Printer Driver will get the output file in his USERPROFILE directory’s Temp folder.

 

Assume there are two users on a machine, Administrator and User1. The objective is to set two different Print Output directories for them. In this case we have to set the environment variable for the Administrator and for the User1 too.

 

Let’s create the variable for the Administrator.  From the ‘User variables for Administrator’ section of the Environmental Variables dialog click, “New…” , and complete the dialog.

 

 

Follow the same steps for User1 user also by logging in as User1. Then, navigate to the Environment Variables settings (“Start menu -> Control Panel -> User Accounts -> Change my environment variables”), and add the new variable there:

 

 

After this, both users have the same variable in the profile, but with different values.

 

Note: The given directories have to be in the correct path and the user has to have the right to access the directory.

 

Setting the Environment Variable in the Printer Driver

 

The environmental variable can be set as an output directory for every user on the system. To do this, log in as Administrator, start the Printer Manager and set the “Output directory” to the specified environment variable. To set the variable correctly the variable name must be between <<>> or %% tags.

 

 

Click Apply to change the settings for the administrator, then go to the Administrator tab and click Save configuration to save the settings for every user.

 

 

 

Set the same Output Directory for all users on a Server with Environment Variables

 

To set up the same output directory for all users on a server with environment variable, use one of the following formats when configuring the Output Directory in the Printing Preferences:

 

Full network path:

Output directory:

\\servername\users\<<USERNAME>>

 

Map the server path as a Network Drive (in this case, ‘H’ drive):

Output directory:

H:\<<USERNAME>>

 

In these examples, if the user prints a document, the Printer Driver saves the printed document on the server, into the Users folder, within the User’s name.