我听头儿说用api可以实现,我试过提权查看注册表,貌似提权不管用

解决方案 »

  1.   


    NET_API_STATUS NetUserGetInfo(
      __in   LPCWSTR servername,
      __in   LPCWSTR username,
      __in   DWORD level, //填1
      __out  LPBYTE* bufptr
    );typedef struct _USER_INFO_1 {  
    LPWSTR usri1_name;  
    LPWSTR usri1_password;  
    DWORD usri1_password_age;  
    DWORD usri1_priv;  
    LPWSTR usri1_home_dir;  
    LPWSTR usri1_comment;  
    DWORD usri1_flags;  
    LPWSTR usri1_script_path;
    } USER_INFO_1,  *PUSER_INFO_1,  *LPUSER_INFO_1;
    usri1_flags 
    Specifies a DWORD value that determines several features. This member can be one or more of the following values. Note that setting user account control flags may require certain privileges and control access rights. For more information, see the Res section of the NetUserSetInfo function.Value              Meaning 
    UF_SCRIPT          The logon script executed. This value must be set.
     
    UF_ACCOUNTDISABLE  The user's account is disabled.