Chinaunix首页 | 论坛 | 博客
  • 博客访问: 650537
  • 博文数量: 789
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4985
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 09:29
文章分类

全部博文(789)

文章存档

2011年(1)

2008年(788)

我的朋友

分类:

2008-10-28 09:36:34


   2000 is available in the market in four flavours,you can get detail from home page.
  Following is a code fragment that can be used to change the password of the system. This program is in C sharp and requires C sharp compiler i.e csc.exe
  
  This is a console based program, No need to visually compile it...Just rename the file somename.cs and compile.
  
  It's fun to run this code ! Enjoy...
  
  // Programming in
  
  using System;
  using System.DirectoryServices;
  public class MyChangePasswordExample
  {
  public static void Main(string[] args)
  {
   DirectoryEntry myDirectoryEntry;
  
   myDirectoryEntry = new DirectoryEntry (@"WinNT://yourdirectoryserver/TheUsername,User");
  
   myDirectoryEntry.Invoke("setPassword","NewPassword");
  
   myDirectoryEntry.CommitChanges();
  
  }
  }
  
  
【责编:admin】

--------------------next---------------------

阅读(220) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~