Click to Rate and Give Feedback
MSDN
MSDN Library
WMI Reference
WMI Classes
Win32 Classes
 BackupEventlog Method of the Win32_...
BackupEventlog Method of the Win32_NTEventlogFile Class

The BackupEventLog method saves the specified event log to a backup file. If a backup file with the same name exists, the method fails.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax

uint32 BackupEventlog(
  [in]  string ArchiveFileName
);

Parameters

ArchiveFileName [in]

Path and file name of the backup file to be created.

Note   If the ArchiveFileName comes from a source that you do not know or trust, then this parameter value should be verified before using it in a call to BackupEventlog.

Return Value

Returns one of the values listed in the following table or any other value to indicate an error.

Return code Description

0

Success

8

Privilege missing

21

Invalid parameter

80

Archive file name already exists. This value is returned starting with Windows Vista.

Windows Server 2003, Windows XP, Windows 2000, and Windows NT 4.0:  The return code indicating that the archive file name already exists is 183.

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Client Requires Windows Vista, Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0 SP4 and later.
Server Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0 SP4 and later.
MOF

Declared in Ntevt.mof.

DLL

Requires Ntevt.dll.

Namespace

Defined in \root\cimv2.

See Also

Operating System Classes
Win32_NTEventlogFile


Send comments about this topic to Microsoft

Build date: 8/20/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
戻り値      尾崎義尚   |   Edit   |  
処理に失敗したとき、上記以外の戻り値を返すことがあります。
その場合、Windowsが定義するエラーコードを確認するため、エラールックアップなどのツールを使って確認することをお薦めします。
Tags What's this?: Add a tag
Flag as ContentBug
Required privilege      Tyappi   |   Edit   |  
To invoke this method, SE_BACKUP_NAME privilege must be enabled.
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker