请问我要修改网络属性需要以下的哪个权限?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

解决方案 »

  1.   

    虽然不知道,但提供一个提升到DeBug权限的代码:
    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;
      

  2.   

    对,我想在执行我的程序时具有Administrator权限.
    zhaoyu_me():
    你的方法我试过,但好像不行,这个只能中止运行的进程.
    期待中...
      

  3.   

    如果我用LogonUser得到了一个Token,怎样把该Token赋给当前进程?
      

  4.   

    southdream(南国幽梦) ,你是怎么搞定的啊?能把代码贴出来看看吗?