共用方式為


CopyObject method of the BcdStore class

Copies the specified object from another store.

Syntax

boolean CopyObject(
  [in]  string    SourceStoreFile,
  [in]  string    SourceId,
  [in]  uint32    Flags,
  [out] BcdObject Object
);

Parameters

SourceStoreFile [in]

The full path to the store that contains the object to copy. If this parameter is an empty string (""), the method uses the system store.

SourceId [in]

The object identifier of the object to copy. This is a GUID in string form, surrounded by curly braces.

Flags [in]

This parameter can be neither, one, or both of the following values.

Value Meaning
CreateNewId
0x1
Creates a new object identifier for the object coped to the target store. If CreateNewId is not set, the object identifier from the source store is used.
DeleteExistingObject
0x2
Deletes the existing object from the target store before copying the object from the source store. If DeleteExistingObject is not set, the existing object is not deleted from the target store.

Object [out]

A Bcdobject instance that represents the copied object in the target store.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Namespace
Root\WMI
MOF
Bcd.mof

See also

BcdStore