请问各位大哥如何能够获得WINDOWS系统中帐户的建立时间,如果可以打命令实现也请告诉小弟,谢谢!

解决方案 »

  1.   

    用net命令就可以呀net user administrator 可以得到一些信息你可以用NET的管理重定向功能,把net命令的执行结果得到
    然后再进行分析,就可以喽
      

  2.   

    System.Diagnostics.Process p =new Process();
    p.StartInfo.FileName="cmd.exe";
    p.StartInfo.CreateNoWindow=true;
    p.StartInfo.RedirectStandardInput=true;
    p.StartInfo.RedirectStandardOutput=true;
    p.StartInfo.UseShellExecute=false;
    p.Start(); p.StandardInput.WriteLine("net user administrator");
    p.StandardInput.Close();
    System.IO.StreamReader sr = p.StandardOutput;
    string s =sr.ReadToEnd();
    MessageBox.Show(s);//这里就是你的数据喽,自在处理一下,可能有相关的API接口可以实现相同的功能
      

  3.   

    楼上的大哥实际是调用NET USER命令,但此命令并不能查出帐号具体建立时间
      

  4.   

    adsi,具体代码手头没有,如果不急,礼拜一给你
      

  5.   

    可试搜 ldap/winnt/adsi 用户信息,
    基本思路,使用adsi搜索到对应用户信息,然后可以查看所有属性.
    参考:
    http://blog.csdn.net/flier_lu/archive/2005/01/31/274948.aspx
      

  6.   

    域用户是通过ldap://rootdse来得到的
    本机是通过:winnt://......
    来得到的,基本差不多
      

  7.   

    ms-help://MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfSystemDirectoryServicesDirectoryEntryClassPathTopic.htm
      

  8.   

    谢谢大大,可是小弟不是很理解他的意思,大大能给你具体的例子吗,谢谢,比如获取GUEST的信息