ChangeSecurityPermissionsEx method of the CIM_DataFile class
The ChangeSecurityPermissionsEx method changes the security permissions for the logical data file specified in the object path (this method is an extended version of the ChangeSecurityPermissions method). If the logical file is actually a directory, then this method will act recursively, changing the security permissions for all of the files and sub-directories that the directory contains.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
uint32 ChangeSecurityPermissionsEx( [in] Win32_SecurityDescriptor SecurityDescriptor, [in] uint32 Option, [out] string StopFileName, [in] string StartFileName, [in] boolean Recursive );
Parameters
- SecurityDescriptor [in]
-
Specifies security information.
Note A NULL ACL in the SECURITY_DESCRIPTOR structure grants unlimited access. For more information about the implications of unlimited access, see Creating a Security Descriptor for a New Object.
- Option [in]
-
Security privilege to modify. For example, to change the owner and DACL security, use:
Option = 1 + 4orOption = CHANGE_OWNER_SECURITY_INFORMATION | CHANGE_DACL_SECURITY_INFORMATION - StopFileName [out]
-
String that represents the name of the file (or directory) where the method failed. This parameter is null if the method succeeds.
- StartFileName [in]
-
String that represents the child file (or directory) to use as a starting point for this method. Typically, the StartFileName parameter is the StopFileName parameter specifying the file or directory at which an error occurred from the previous method call. If this parameter is null, the operation is performed on the file (or directory) specified in the ExecMethod call.
- Recursive [in]
-
If True, the method is also applied recursively to files and directories within the directory that is specified by the CIM_DataFile instance. For file instances, this parameter is ignored.
Return value
| Return code | Description |
|---|---|
|
Success. |
|
Access denied. |
|
Unspecified failure. |
|
Object name specified is not valid. |
|
Object already exists. |
|
File system not NTFS. |
|
Platform not Windows NT or Windows 2000. |
|
Drive not the same. |
|
Directory not empty. |
|
Sharing violation. |
|
The start file is not valid. |
|
Privilege not held. |
|
A parameter is not valid. |
Remarks
The ChangeSecurityPermissionsEx method in CIM_DataFile is implemented by WMI.
This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.
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
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012
