Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

DeleteVar method

Project: Environment Variables Unit

Unit: PJEnvVars

Class: TPJEnvVars

Applies to: ~>3.0

procedure DeleteVar(const Name: string);

⚠️ TPJEnvVars has been deprecated. Use the TPJEnvironmentVars.Delete static method in preference.

Description

Deletes the environment variable with the given name.

Parameters:

A EPJEnvVars exception is raised if it is not possible to delete the variable.

Note: This method does not update the system’s environment variables, only the copy of the environment maintained by this program. Changes are lost when the program terminates.