搜尋此網誌

2011年10月21日 星期五

EFI Shell commands -- SET(顯示、建立、改變、或刪除EFI Shell環境變數)

Displays, creates, changes, or deletes EFI Shell environment variables.

SET [-v] [sname [value]]
SET [-d ]

    -d       - Deletes the environment variable
    -v       - Volatile variable
    sname    - Environment variable name
    value    - Environment variable value

Notes:
    1. SET values are stored in EFI NVRAM and will be retained between boots
       unless the option -v is specified.
    2. The dmpstore command can be used to display EFI Shell NVRAM variables.
    3. Available NVRAM storage available for the set command will depend on
       the system implementation.
    4. SET may store NVRAM variables on the file system /efi/boot/bootstr.nvr
       if no NVRAM is implemented by the core EFI routines.

Examples:
  * To add an environment variable:
    Shell> set DiagnosticPath fs0:\efi\diag;fs1:\efi\diag

  * To display all 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 will disappear 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