This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a new user on the local active directory | |
public bool add_user(string user_name, string user_password) { | |
try { | |
DirectoryEntry AD = new DirectoryEntry("WinNT://" + Environment.MachineName + ",computer"); | |
DirectoryEntry NewUser = AD.Children.Add(user_name, "user"); | |
NewUser.Invoke("SetPassword", new object[] { password_password }); | |
NewUser.Invoke("Put", new object[] { "Description", user_name }); | |
NewUser.CommitChanges(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- We can call the function using the onclick function on the html --> | |
<input type="image" id="sayhi_input" onclick="pop.create('Say hi!')"> | |
<script> | |
//Declaration of the Class "Popup" | |
function Popup() { | |
} | |
Popup.prototype = { | |
constructor: Popup, //Construct |
NewerOlder