J'ai mon petit script mais je n'arrive pas a faire la règle pour la double condition if strPhone =Gr1 ET strOffice =Bureau1 ALORS fait ceci?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
strPhone = objUser.telephoneNumber
strOffice = objUser.physicalDeliveryOfficeName
Set objNetwork = CreateObject("WScript.Network")
Set objUser = CreateObject("ADSystemInfo")
Set objCurrentUser = GetObject("LDAP://" & objUser.UserName)
 
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Popup "Blabla",30, "Note", 0
 
If (InStr(LCase(strPhone), "Gr1") = 1) And If (InStr(LCase(strOffice), "Bureau1") = 1) Then
objNetwork.MapNetworkDrive "X:", "\\serveur\partage\dir\"& strPhone
End If
 
If (InStr(LCase(strPhone), "Gr2") = 1) And If (InStr(LCase(strOffice), "Bureau1") = 1) Then
objNetwork.MapNetworkDrive "X:", "\\serveur\partage\dir\"& strPhone
End If
Est ce que c'est possible?

Merci de votre aide