HP Unified Extensible Firmware Interface User Manual

Page 49

Advertising
background image

set

Displays, changes, or deletes a UEFI Shell environment variable.

Syntax

set

[-v] [sname [value]]

set

[-d sname]

Options

-v

Sets a volatile variable that disappears at the next boot.

-d

Deletes a variable.

sname

Specifies a variable name.

value

Specifies a variable value.

Description

This command maintains the UEFI Shell environment variables. It can be used to:

Display environment variables.

Create new environment variables.

Change the value of existing environment variables.

Delete environment variables.

This command sets the environment variable specified by sname to the optional value parameters.
If used without any parameters, then all the environment variables are displayed. If used with the
-d

option, then the environment variable that is specified bysname is deleted.

NOTE:

This command does not change the value of the environment variable lasterror.

Examples

To add an environment variable:

Shell> set DiagnosticPath fs0:\efi\diag;fs1:\efi\diag

To display environment variables:

Shell> set
* path : .
diagnosticPath : fs0:\efi1.1\diag;fs1:\efi1.1\diag

To delete an environment variable:

Shell> set -d diagnosticpath
Shell> set
* path : .

To change an environment variable:

fs0:\> set src efi
fs0:\> set
]* path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
src : efi
fs0:\> set src efi1.1
fs0:\> set
* path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
src : efi1.1

To append an environment variable:

Shell> set
* path : .
Shell> set path %path%;fs0:\efi\tools;fs0:\efi\boot;fs0:\

UEFI Shell commands

49

Advertising
This manual is related to the following products: