I have two scripts, perhaps not programmed the most efficient way, but
anyways they work. How do i put this into one script, right now i need
to execute them seperately, how do i say when script1 is finnished
goto script 2 ?
The reason i would like to know this is, because i do like to build in
some conditions, like when people do connect over RRAS, do not run the
auditing
Thanks in advance
Ralph
script 1:
'On Error Resume Next
Const OTTOYORK_GROUP = "cn=wij_ottoyork"
Const ENGINEERING_GROUP = "cn=wij_engineering"
Const ACCOUNTING_GROUP = "cn=wij_accounting"
Const GLITSCH_GROUP = "cn=wij_glitsch"
Const ENGINEERING_RO_GROUP = "cn=wij_engineering_ro"
Const ITIS_GROUP = "cn=wij_itis"
Const SDWORX_GROUP = "cn=wij_sdworx"
Const SALES_GROUP = "cn=wij_sales"
Const ISABEL_GROUP = "cn=wij_isabel"
Const KMS_GROUP = "cn=wij_kms"
Const ISO9000_GROUP = "cn=wij_iso9000"
Const INTRASTAT_GROUP = "cn=wij_intrastat"
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "i:", "\\koytest\Users\" &
wshNetwork.UserName
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, ENGINEERING_GROUP) Then
WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"
End If
If InStr(strGroups, ENGINEERING_RO_GROUP) Then
WSHNetwork.MapNetworkDrive "l:", "\\koytest\engineering"
End If
If InStr(strGroups, OTTOYORK_GROUP) Then
wsh.Network.MapNetworkDrive "k:", "\\koytest\ottoyork"
End If
If InStr(strGroups, ACCOUNTING_GROUP) Then
wshNetwork.MapNetworkDrive "o:", "\\koytest\org_o"
wshNetwork.MapNetworkDrive "p:", "\\koytest\org_p"
End If
If InStr(strGroups, GLITSCH_GROUP) Then
WSHNetwork.MapNetworkDrive "g:", "\\koytest\glitsch"
End If
If InStr(strGroups, ITIS_GROUP) Then
wshNetwork.MapNetworkDrive "m:", "\\koytest\it$"
wshNetwork.MapNetworkDrive "v:", "\\koytest\software$"
End If
If InStr(strGroups, SDWORX_GROUP) Then
WSHNetwork.MapNetworkDrive "x:", "\\koytest\sd worx"
End If
If InStr(strGroups, SALES_GROUP) Then
WSHNetwork.MapNetworkDrive "s:", "\\koytest\sales"
End If
If InStr(strGroups, ISABEL_GROUP) Then
WSHNetwork.MapNetworkDrive "u:", "\\koytest\isabel"
End If
If InStr(strGroups, KMS_GROUP) Then
wshNetwork.MapNetworkDrive "k:", "\\koytest\koch"
wshNetwork.MapNetworkDrive "s:", "\\koytest\shared"
wshNetwork.MapNetworkDrive "x:", "\\koytest\project"
End If
If InStr(strGroups, ISO9000_GROUP) Then
WSHNetwork.MapNetworkDrive "v:", "\\koytest\iso9000"
End if
script 2:
Dim objFSO, objShell
Set objFSO = Createobject("Scripting.Filesystemobject")
Set objShell =CreateObject("WScript.Shell")
objShell.Run "\\khmerd01n04\ezaudit\ezstart.exe /auto" ,1 , False
Set objFSO = Nothing
Set objShell = Nothing