set
Syntax
set[-v][sname[value]]
set[-d sname]
Description
Creates, displays, changes, or deletes a UEFI Shell environment variable.
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.
Usage
This command sets the environment variable specified by
sname
to the optional
value
parameters. If used without any parameters, all of the environment variables are displayed. If used with the
-d
option, the environment variable that is specified by
sname
is deleted.
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:\
Shell> set
* path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
To set a volatile variable that disappears at the next boot:
Shell> set -v EFI_SOURCE c:\project\EFI1.1
Shell> set
* path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
* EFI_SOURCE : c:\project\EFI1.1