Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Very easy question about logon script

Status
Not open for further replies.

ITbeast

IS-IT--Management
Jul 25, 2006
67
US
Hello,

I know very little about vbscript; I usually am able to look at others at modify the code to do what I want, but can't write my own code for crap.

I have a drive that I want to map out to everyone except two employees. I have used the following line to not map the drive out for one individual, but can't seem to figure out how to do it for multiple people:

If strUserID <> "user1" Then
Call MapDrive ("Z:", "movies", "movies", "Movies")
End If


I've tried various things such as:

If strUserID <> "user1" or strUserID <> "user2" Then
Call MapDrive ("Z:", "movies", "movies", "Movies")
End If

*This maps it out for both of them

If (strUserID <> "user1") or (strUserID <> "user2") Then
Call MapDrive ("Z:", "movies", "movies", "Movies")
End If

*Syntax error
 
If strUserID <> "user1" And strUserID <> "user2" Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top