Hi,
As some of you know already, this week I have my ICT exam.
The exam lasts for 5 days, starting on Monday and ending on Friday.
Any help is allowed, as long as I write references and stuff.
I have setup the server and clients, and everything is working ok.
In Active Directory I have three groups: "Lead Doctors", "Doctors" and "Nurses".
I have successfully written logon scripts, like "Add Default printer" and "map H: to home folder on server".
But in the task it also says that "Doctors" and "Nurses" must have a shared folder on the server.
So I was thinking that I could map this to G: on login as well.
after some thought I found that if I could get the username and group the user is currectly logged on to, i could run an IF statement and if the user is in the right group, map the G: to the shared folder. So..
How can I get the username and usergroup of the current user that is trying to log in on a client, And how can I check if this user is a member of the correct group?
My pseudo code:
Quote: "
strGroup1 = "Doctors"
strGroup2 = "Nurses"
strUsername = %username%
strUserGroup = getUserGroup( username )
If strUserGroup = strGroup1 || strUserGroup = strGroup2 Then
net use G: \\server\sharedfolder$
End If
"
I'm not sure if this should be done in java script, batch or vb script?
After some searches online I found a vb script which I couldn't really make out, so my last resort is to come here and ask.
If I can't get this figured out, I'll have to drop it and get some minus points :/ but I'd rather not.
Thanks for your time.