This command sets an entry option value in the boot configuration data store. bcdedit /store /set { } /addfirst | /addlast ...

This command sets an entry option value in the boot configuration data store.

bcdedit [/store ] /set [{}]   [ /addfirst | /addlast | /remove ]

      Specifies the store to be used. If this option is not
                specified, the system store is used. For more information,
                run "bcdedit /? store".

            Specifies the identifier of the entry to be modified.  If not
                specified, {current} is used. For more information about
                identifiers, run "bcdedit /? ID".

      Specifies the option data type that will be created or
                modified. Run "bcdedit /? TYPES" for more information about
                data types.

         Specifies the value that should be assigned to the option. The
                format of  depends on the data type specified. Run
                "bcdedit /? FORMATS" for more information about data formats.

    /addfirst   This switch can only be used if datatype is an object list.
                Adds the specified entry identifier to the top of the list.
                If this switch is specified, only a single entry identifier
                may be specified.  If the specified identifier is already
                in the list, it will be moved to the top of the list.

    /addlast    This switch can only be used if datatype is an object list.
                Adds the specified entry identifier to the end of the list.
                If this switch is specified, only a single entry identifier
                may be specified.  If the specified identifier is already
                in the list, it is moved to the end of the list.

    /remove     This switch can only be used if datatype is an object list.
                Removes the specified entry identifier from the list.
                If this switch is specified, only a single entry identifier
                may be specified.  If the identifier is not in the list
                then the operation has no effect. If the last entry is being
                removed, then the datatype value is deleted.

Examples:

The following command sets the application device to the partition C: for the
specified operating system entry:

    bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} device partition=C:

    NOTE: Use 'hd_partiton=' syntax to explicitly disable automatic VHD
          detection, and create entries that are compatible for booting a
          virtual machine, i.e.,

    bcdedit /store F:\boot\bcd /set {default} device hd_partition=F:

The following command sets the OS device to a VHD file (C:\vdisks\vdisk01.vhd)
for the specified operating system entry:

    bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} osdevice
        vhd=[C:]\vdisks\disk01.vhd

The following command sets the application path to
\windows\system32\winload.exe for the specified operating system entry:

    bcdedit /set {cbd971bf-b7b8-4885-951a-fa03044f5d71} path
        \windows\system32\winload.exe

The following command sets the NX policy to OptIn for the current operating
system boot entry.

    bcdedit /set nx optin