IGPMStarterGPO::Save method (gpmgmt.h)
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(
[in] BSTR bstrSaveFile,
[in] VARIANT_BOOL bOverwrite,
[in] VARIANT_BOOL bSaveAsSystem,
[in, optional] VARIANT *bstrLanguage,
[in, optional] VARIANT *bstrAuthor,
[in, optional] VARIANT *bstrProduct,
[in, optional] VARIANT *bstrUniqueID,
[in, optional] VARIANT *bstrVersion,
[in, optional] VARIANT *pvarGPMProgress,
[out, optional] VARIANT *pvarGPMCancel,
[out] IGPMResult **ppIGPMResult
);
Parameters
[in] bstrSaveFile
Name of the file to which the Starter GPO should be saved. Use null-terminated string.
[in] bOverwrite
Boolean value that determines whether the file should be overwritten, if it exists.
[in] 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.
[in, optional] 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.
[in, optional] bstrAuthor
Specifies the Author property of the new system Starter GPO. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored.
[in, optional] bstrProduct
Specifies the Product property of the new system Starter GPO. If bSaveAsSystem is VARIANT_FALSE this parameter is ignored
[in, optional] 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.
[in, optional] 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
[in, optional] 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.
[out, optional] 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.
[out] 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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | gpmgmt.h |
DLL | Gpmgmt.dll |