Specifications

Version 2.0
191
setvar
Summary
Changes the value of a UEFI variable.
Usage
setvar variable-name [–guid guid][-bs][-rs][-nv] [=data]
Options
variable-name
The name of the UEFI variable to modify or display.
-guid
Specifies the GUID of the UEFI variable to modify or display. If not present, then
the GUID EFI_GLOBAL_VARIABLE, as defined in chapter 3.2 of the UEFI
specification.
-bs
Indicates that the variable is a boot variable. Should only be present for new
variables, otherwise it is ignored.
-rt
Indicates that the variable is a runtime variable. Should only be present for new
variables, otherwise it is ignored.
-nv
Indicates that the variable is non-volatile. If not present, then the variable is
assumed to be volatile. Should only be present for new variables, otherwise it is
ignored.
=data
New data for the variable. If there is nothing after the ‘=’ then the variable is
deleted. If = is not present, then the current value of the variable is dumped as
hex bytes. The data may consist of zero or more of the following:
xx[xx]:
Hexadecimal bytes
“ascii-string”:
ASCII-string with no null-terminator
L”UCS2-string”:
UCS-2 encoded string with no null-terminator
--device
Device path text format, as specified by the EFI Device Path Display
Format Overview section of the UEFI 2.1 specification.