![]() |
|
|||||||
| ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
For an Active Directory, automated user account creation script I've designed and tested the username is supposed to be inputted when the script is run. The password for the account is generated using a password-generating function that I googled, but my boss has requested that the username should be generated the same way as the password is. Meaning he wants to supply the first and last name of the user, their description, and some other menial data, and when the script tries to create the account it will check the availability for say firstname+lastname as the username and if thats not availabe, it will dynamically generate other possible usernames.
Is there a way in VBScript to generate a string that would be perhaps the first letter in one string+a second string, then if that isn't available as a username it would take the first 2 letters+the second string. e.g. user is Joe Brown create user JoeBrown: error name exists already create user JBrown: error name exists already create user JoBrown: success I could do this simple enough with C# but of course I'm stuck in vbscript. Any vb wizards out there able to shed some light on my predicament? Thanks |
|
This ad is part of our Revenue Sharing program |