Re: question re: user account creation script
- From: "Al Dunbar [MS-MVP]" <alan-no-drub-spam@xxxxxxxxxxx>
- Date: Sat, 20 Jan 2007 15:52:15 -0700
"Jeremy Schubert" <jschubert@no*spam.shaw.ca> wrote in message
news:%23Q5OFaLPHHA.324@xxxxxxxxxxxxxxxxxxxxxxx
I am almost finished creating a user creation script for a school.
It reads data from a csv file to create all the attributes etc.
1. Is the following line acceptable:
objUser,Put "Display Name" strFirst & " " & strLast
Syntactically wrong: comma should be a period, and the two string
expressions ("display name") and (srfirst & " " & strlast) need something
else between them, likely a comma.
2. The user is instructd to first create a spread *** with appropriateeasy
colums and then convert that to a csv file and then a txt file. The
instructions also say to strip any characters other then alphabetical
characters (e.g. hyphen, comma, and space) from the names. Would it be
to add lines to my script that double check that this has been done and tothe
remove them if they haven't been. (If removing is a lot of work, I can
cancel the creation of that particular user account and write a note to
log file.). Would I basically use something like:
If instrFirst(",") or if instrFirst("-") or if instrFrist(" ")
Then (write log file entry and move on to next user)
EndIf
If instrLast(",") or if instrLast("-") or if instrLast(" ")
Then (write log file entry and move on to next user)
Else (continue on with script)
Depends on how much work you want to force onto the user, and whether or not
simply stripping the characters you do not want will result in acceptable
attribute values, but you could do this either with a number of replace
commands (simple but repetitive and moderately inefficient), or with regular
expressions (a bit more involved).
/Al
.
- Follow-Ups:
- Re: question re: user account creation script
- From: Jeremy Schubert
- Re: question re: user account creation script
- References:
- question re: user account creation script
- From: Jeremy Schubert
- question re: user account creation script
- Prev by Date: Re: ipaddress conversion
- Next by Date: vb script to remove a startup entry
- Previous by thread: question re: user account creation script
- Next by thread: Re: question re: user account creation script
- Index(es):