Re: Torgeir Bakken
From: Al Dunbar [MS-MVP] (alan-no-drub-spam_at_hotmail.com)
Date: 01/18/05
- Next message: Zeno: "Re: Logon script bugs......."
- Previous message: Al Dunbar [MS-MVP]: "Re: Import Contacts into AD for Exchange"
- In reply to: Al Dunbar [MS-MVP]: "Re: Torgeir Bakken"
- Next in thread: OverSeer: "Re: Torgeir Bakken"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 23:01:08 -0700
"Al Dunbar [MS-MVP]" <alan-no-drub-spam@hotmail.com> wrote in message
news:OsSwPRz%23EHA.4092@TK2MSFTNGP09.phx.gbl...
>
> "Leon Cripps" <LeonCripps@discussions.microsoft.com> wrote in message
> news:B5B8BE63-610D-4E82-AFAA-661C6C79B8B4@microsoft.com...
> > I recieved your comment on another forum to look at some other login
> scripts,
> > none of the links you gave me seem to do the trick. Maybe Im being
really
> > stupid ( wouldnt surprise me) but I can map easily using groups that
USERS
> > are members of its just mapping by groups that COMPUTERS are members of.
> Ive
> > even seen somewhere that this may not even be possible. Like I said I
> would
> > like to do it even if its by what OU the computer is in.
<snip>
> I don't have access to our domain from here, but if you would like, I
could
> get a copy of the code (probably slightly edited) to share with you next
> week.
In case it is of interest or will help, below is a snippet of the code.
"CompDN" is a function that returns the distinguished name of the computer.
/Al
' determine which unit, if any, this workstation belongs to
share = ""
sgcount = 0
with GetObject( "LDAP://" & CompDN() )
For Each groupob In .groups
If ( groupob.description <> "" ) Then
sgcount = sgcount + 1
If ( sgcount = 1 ) Then
share = groupob.description
else
share = ""
End if
End if
Next
End With
' unit affiliation is valid?
If ( share = "" ) Then
' not valid, advise user
MsgBox "Workstation " & WNO.ComputerName & " has" _
&vbnewline & "not been assigned a unit file
folder" _
& vbnewline & vbnewline & "Contact Informatics",
, "Unit File Folders"
Else
' valid. map share if necessary
If ( not FSO.DriveExists( drive ) ) Then
WNO.MapNetworkDrive drive, share
End If
' open up explorer on the drive
WSO.run "explorer.exe " & drive
End if
- Next message: Zeno: "Re: Logon script bugs......."
- Previous message: Al Dunbar [MS-MVP]: "Re: Import Contacts into AD for Exchange"
- In reply to: Al Dunbar [MS-MVP]: "Re: Torgeir Bakken"
- Next in thread: OverSeer: "Re: Torgeir Bakken"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|