IGPMStarterGPO::Save method

Saves all Starter GPO settings into a single CAB file. Optionally the user may specify to save a custom Starter GPO as a system Starter GPO.

Syntax

HRESULT Save(
  BSTR         bstrSaveFile,
  VARIANT_BOOL bOverwrite,
  VARIANT_BOOL bSaveAsSystem,
  VARIANT      *bstrLanguage,
  VARIANT      *bstrAuthor,
  VARIANT      *bstrProduct,
  VARIANT      *bstrUniqueID,
  VARIANT      *bstrVersion,
  VARIANT      *pvarGPMProgress,
  VARIANT      *pvarGPMCancel,
  IGPMResult   **ppIGPMResult
);

Parameters

bstrSaveFile

Name of the file to which the Starter GPO should be saved. Use null-terminated string.

bOverwrite

Boolean value that determines whether the file should be overwritten, if it exists.

bSaveAsSystem

Boolean value that specifies whether to convert the Starter GPO into a system template as part of the save. By default, the value is VARIANT_FALSE, save as a system Starter GPO. This option must be VARIANT_FALSE if the Starter GPO being saved is a system Starter GPO; entering VARIANT_TRUE for a system Starter GPO will return an invalid argument error.

bstrLanguage

Specifies the MUI language code all the language specific strings of the custom Starter GPO will be exported during the save. The custom Starter GPO strings are converted into MUI resources without performing any language checks on the strings. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored. If this parameter is NULL, the user's current language code is used.

bstrAuthor

Specifies the Author property of the new system Starter GPO. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored.

bstrProduct

Specifies the Product property of the new system Starter GPO. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored

bstrUniqueID

Specifies the ID property of the new system Starter GPO. If the parameter is NULL a new unique ID will be generated. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored.

bstrVersion

Specifies the Starter GPO version of the new system Starter GPO. The format of the string must be 4 digits-dot-5 digits. If the value is NULL the version is set to 1.0. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored

pvarGPMProgress

Pointer to an IGPMAsyncProgress interface that allows the client to receive status notifications about the progress of the copy operation. If not NULL, the call to GenerateReport is handled asynchronously and pvarGPMCancel receives a pointer to an IGPMAsyncCancel interface. If this parameter is NULL the call to GenerateReport is handled synchronously. The pvarGPMProgress parameter must be NULL if the client should not receive asynchronous notifications.

pvarGPMCancel

Receives a pointer to an IGPMAsyncCancel interface that the client can use to cancel the copy operation. This parameter is not returned if pvarGPMProgress is NULL.

ppIGPMResult

Pointer to an IGPMResult. The Result property contains a string representing the GUID of the saved Starter GPO. If bSaveAsSystem is VARIANT_TRUE, the Starter GPO will be saved with a new GUID as specified by bstrUniqueID. The Status property contains a reference to an IGPMStatusMsgCollection.

Return Value

Returns S_OK if successful. Returns a failure code if an error occurs.

Requirements

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header gpmgmt.h
DLL Gpmgmt.dll

See Also

IGPMStarterGPO