I want to use instead (*argument)["USERNAME"] of S"username".
How i can use ?
Thanks for all...
//Build the path, and then bind to computer.
String *adsPath = String::Format(S"WinNT://{0},computer", Environment::MachineName);
DirectoryEntry *computerEntry = new DirectoryEntry(adsPath);
DirectoryEntry *userEntry = computerEntry->Children->Add(S"username", S"user");
userEntry->Properties->get_Item(S"Description")->Add(S"Test user from .NET");
//Set the password, and then commit the changes.
String *stringArray[] = new String *[1];
stringArray[0] = S"#12353Abc";
userEntry->Invoke(S"SetPassword", stringArray);
userEntry->CommitChanges();
//Add the new user to a group.
DirectoryEntry *groupEntry = computerEntry->Children->Find(S"Administrators");
stringArray[0] = userEntry->Path;
groupEntry->Invoke(S"Add", stringArray);