请问我要修改网络属性需要以下的哪个权限?NTRights
---------------------------------------------------------------
SeAssignPrimaryTokenPrivilege: Replace a process level token
SeAuditPrivilege: Generate security audits
SeBackupPrivilege: Back up files and directories
SeBatchLogonRight: Log on as a batch job
SeChangeNotifyPrivilege: Bypass traverse checking
SeCreatePagefilePrivilege: Create a paging file
SeCreatePermanentPrivilege: Create permanent shared objects
SeCreateTokenPrivilege: Create a token object
SeDebugPrivilege: Debug programs
SeIncreaseBasePriorityPrivilege: Increase scheduling priority
SeIncreaseQuotaPrivilege: Increase quotas
SeInteractiveLogonRight: Log on locally
SeLoadDriverPrivilege: Load and unload device drivers
SeLockMemoryPrivilege: Lock pages in memory
SeMachineAccountPrivilege: Add workstations to domain
SeNetworkLogonRight: Access this computer from the network
SeProfileSingleProcessPrivilege: Profile single process
SeRemoteShutdownPrivilege: Force shutdown from a remote system
SeRestorePrivilege: Restore files and directories
SeSecurityPrivilege: Manage auditing and security log
SeServiceLogonRight: Log on as a service
SeShutdownPrivilege: Shut down the system
SeSystemEnvironmentPrivilege: Modify firmware environment values
SeSystemProfilePrivilege: Profile system performance
SeSystemTimePrivilege: Change the system time
SeTakeOwnershipPrivilege: Take ownership of files or other objects
SeTcbPrivilege: Act as part of the operating system
SeUnsolicitedInputPrivilege: Read unsolicited input from a terminal device
-----------------------------------------------------------------------------
急:在线等ing
---------------------------------------------------------------
SeAssignPrimaryTokenPrivilege: Replace a process level token
SeAuditPrivilege: Generate security audits
SeBackupPrivilege: Back up files and directories
SeBatchLogonRight: Log on as a batch job
SeChangeNotifyPrivilege: Bypass traverse checking
SeCreatePagefilePrivilege: Create a paging file
SeCreatePermanentPrivilege: Create permanent shared objects
SeCreateTokenPrivilege: Create a token object
SeDebugPrivilege: Debug programs
SeIncreaseBasePriorityPrivilege: Increase scheduling priority
SeIncreaseQuotaPrivilege: Increase quotas
SeInteractiveLogonRight: Log on locally
SeLoadDriverPrivilege: Load and unload device drivers
SeLockMemoryPrivilege: Lock pages in memory
SeMachineAccountPrivilege: Add workstations to domain
SeNetworkLogonRight: Access this computer from the network
SeProfileSingleProcessPrivilege: Profile single process
SeRemoteShutdownPrivilege: Force shutdown from a remote system
SeRestorePrivilege: Restore files and directories
SeSecurityPrivilege: Manage auditing and security log
SeServiceLogonRight: Log on as a service
SeShutdownPrivilege: Shut down the system
SeSystemEnvironmentPrivilege: Modify firmware environment values
SeSystemProfilePrivilege: Profile system performance
SeSystemTimePrivilege: Change the system time
SeTakeOwnershipPrivilege: Take ownership of files or other objects
SeTcbPrivilege: Act as part of the operating system
SeUnsolicitedInputPrivilege: Read unsolicited input from a terminal device
-----------------------------------------------------------------------------
急:在线等ing
function EnablePrivilege(hToken: Cardinal; PrivName: string; bEnable: Boolean): Boolean;
var
TP: TOKEN_PRIVILEGES;
Dummy: Cardinal;
begin
TP.PrivilegeCount := 1;
LookupPrivilegeValue(nil, pchar(PrivName), TP.Privileges[0].Luid);
if bEnable then
TP.Privileges[0].Attributes := SE_PRIVILEGE_ENABLED
else TP.Privileges[0].Attributes := 0;
AdjustTokenPrivileges(hToken, False, TP, SizeOf(TP), nil, Dummy);
Result := GetLastError = ERROR_SUCCESS;
end;
var
hToken: Cardinal;
begin
OpenProcessToken(GetCurrentProcess, TOKEN_ADJUST_PRIVILEGES, hToken);
result:=EnablePrivilege(hToken, 'SeDebugPrivilege', True);
CloseHandle(hToken);
end;
zhaoyu_me():
你的方法我试过,但好像不行,这个只能中止运行的进程.
期待中...