Privilege Constants
Applies to: desktop apps only
The strPrivilege parameter of the SWbemPrivilegeSet.AddAsString method and the iPrivilege parameter for SWbemPrivilegeSet.Add require privilege strings from WbemPrivilegeEnum. For more information about how to use privilege constants, see Executing Privileged Operations.
The following constants are defined in WbemPrivilegeEnum. The following list includes the equivalent constants for C++ and strings for scripting. To form the scripting short name, remove the "Se" and "Privilege" from the C++ constant name.
The following VBScript code example shows how to enable the RemoteShutdown privilege in a script.
Many WMI methods require that one or more permission be enabled. If an account has not been granted a privilege, it cannot be enabled for the method call.
| Wbemdisp.tlb Constant | Description |
|---|---|
|
C++ constant: SE_CREATE_TOKEN_NAME string: SeCreateTokenPrivilege Scripting short name: CreateToken Required to create a primary token object. |
|
C++ constant: SeAssignPrimaryTokenPrivilege string: SeAssignPrimaryTokenPrivilege Scripting short name: AssignPrimaryToken Required to replace a process-level token. |
|
C++ constant: SE_LOCK_MEMORY_NAME string: SeLockMemoryPrivilege Required to lock pages in memory. |
|
C++ constant: SE_INCREASE_QUOTA_NAME string: SeIncreaseQuotaPrivilege Scripting short name: IncreaseQuotaPrivilege Required to adjust memory quotas for a process. |
|
C++ constant: SE_MACINE_ACCOUNT_NAME string: SeMachineAccountPrivilege Scripting short name: MachineAccount Required to add workstations to a domain. |
|
C++ constant: SE_TCB_NAME string: SeTcbPrivilege Scripting short name: Tcb Required to act as part of the operating system. The holder is part of the trusted computer base. |
|
C++ constant: SE_SECURITY_NAME string: SeSecurityPrivilege Scripting short name: Security Required to manage auditing and the NT security log. |
|
C++ constant: SE_TAKE_OWNERSHIP_NAME string: SeTakeOwnershipPrivilege Scripting short name: TakeOwnership Required to assume ownership of files or other objects without having an Access Control Entry (ACE) in the discretionary access control list (DACL). |
|
C++ constant: SE_LOAD_DRIVER string: SeLoadDriverPrivilege Scripting short name: LoadDriver Required to load or unload a device driver. |
|
C++ constant: SE_SYSTEM_PROFILE_NAME string: SeSystemProfilePrivilege Scripting short name: SystemProfile Required to gather profile information about system performance. |
|
C++ constant: SE_SYSTEMTIME_NAME string: SeSystemtimePrivilege Scripting short name: Systemtime Required to change the system time. |
|
C++ constant: SE_PROF_SINGLE_PROCESS_NAME string: SeProfileSingleProcessPrivilege Scripting short name: ProfileSingleProcess Required to gather profile information for a single process. |
|
C++ constant: SE_INC_BASE_PRIORITY_NAME string: SeIncreaseBasePriorityPrivilege Scripting short name: IncreaseBasePriority Required to increase scheduling priority. |
|
C++ constant: SE_CREATE_PAGEFILE_NAME string: SeCreatePagefilePrivilege Scripting short name: CreatePagefile Required to create a pagefile. |
|
C++ constant: SE_CREATE_PERMANENT_NAME string: SeCreatePermanentPrivilege Scripting short name: CreatePermanent Required to create permanent shared objects. |
|
C++ constant: SE_BACKUP_NAME string: SeBackupPrivilege Scripting short name: Backup Required to backup files and directories, regardless of the ACL specified for the file. |
|
C++ constant: SE_RESTORE_NAME string: SeRestorePrivilege Scripting short name: Restore Required to restore files and directories, regardless of the ACL specified for the file. |
|
C++ constant: SE_SHUTDOWN_NAME string: SeShutdownPrivilege Scripting short name: Shutdown Required to shut down the local system. |
|
C++ constant: SE_DEBUG_NAME string: SeDebugPrivilege Scripting short name: Debug Required to debug and adjust the memory of a process owned by another account. |
|
C++ constant: SE_AUDIT_NAME string: SeAuditPrivilege Scripting short name: Audit Required to generate audit entries in the NT Security log. Only secure servers should have this privilege. |
|
C++ constant: SE_SYSTEM_ENVIRONMENT_NAME string: SeSystemEnvironmentPrivilege Scripting short name: SystemEnvironment Required to modify the nonvolatile RAM of systems that use this type of memory to store configuration data. |
|
C++ constant: SE_CHANGE_NOTIFY_NAME string: SeChangeNotifyPrivilege Scripting short name: ChangeNotify Required to receive notifications of changes to files or directories and bypass traversal access checks. This privilege is enabled by default for all users. |
|
C++ constant: SE_REMOTE_SHUTDOWN_NAME string: SeRemoteShutdownPrivilege Scripting short name: RemoteShutdown Required to shut down a remote computer. |
|
C++ constant: SE_UNDOCK_NAME string: SeUndockPrivilege Scripting short name: Undock Required to remove a laptop from a docking station. |
|
C++ constant: SE_SYNC_AGENT_NAME string: SeSyncAgentPrivilege Scripting short name: SyncAgent Required to synchronize directory service data. |
|
C++ constant: SE_ENABLE_DELEGATION_NAME string: SeEnableDelegationPrivilege Scripting short name: EnableDelegation Required to enable computer and user accounts to be trusted for delegation. |
|
C++ constant: SE_MANAGE_VOLUME_NAME string: SeManageVolumePrivilege Scripting short name: ManageVolume Required to managed the files on a volume.
|
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
IDL |
|
See also
- Scripting API Constants
- SWbemSecurity
- WbemPrivilegeEnum
- Executing Privileged Operations
- Executing Privileged Operations Using VBScript
Send comments about this topic to Microsoft
Build date: 3/9/2012