Code:
Option Explicit
const pcstrPath = ";G:\SYSINFO;F:\Public"
const pcstrC3Server = "\\Z02DBCVSC01\"
dim OIE,Time_out,Title,Button
set oIE = CreateObject("InternetExplorer.Application")
Modeless oIE, "VSC Logon Script is running, please wait..."
Dim pstrUserName,pstrGroups,pstrFailed,pstrSpecialVolChar
Modeless oIE, "VSC Logon Script is running, please wait...</p></p> getting User Name"
pstrUserName = fstrGetUserProperty("samAccountName")
Modeless oIE, "VSC Logon Script is running, please wait...</p></p> getting group membership"
pstrGroups = ucase(fstrGetUserProperty("MemberOf"))
if InStr(pstrGroups, "VSC C3 SERVICE ACCOUNTS") then
pstrSpecialVolChar = "Z"
end if
If fblnMapDriveAndFolder("I:", "\\Z02APPVSC01\User Share", "\" & pstrUserName) = False Then
pstrFailed = pstrFailed & "</p>" & "I:" & "\\Z02APPVSC01\User Share\" & pstrUserName & "\ Has NOT been mapped"
End If
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "G:" & pcstrC3Server & pstrSpecialVolChar & "RAFACSII$\"
If fblnMapDriveAndFolder("G:", pcstrC3Server & pstrSpecialVolChar & "RAFACSII$", "") = False Then
pstrFailed = pstrFailed & "</p>" & "G:" & pcstrC3Server & pstrSpecialVolChar & "RAFACSII$\ Has NOT been mapped"
End If
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "H:" & pcstrC3Server & pstrSpecialVolChar & "RAFACS$\"
If fblnMapDriveAndFolder("H:", pcstrC3Server & pstrSpecialVolChar & "RAFACS$", "") = False Then
pstrFailed = pstrFailed & "</p>" & "H:" & pcstrC3Server & pstrSpecialVolChar & "RAFACS$\ Has NOT been mapped"
End If
if InStr(pstrGroups, "VSC USERS - CIS") then
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "J:\\Z02RSCVSC04\NOVAShare\MIS\LOCAL"
If fblnMapDriveAndFolder("J:", "\\Z02RSCVSC04\NOVAShare\MIS\LOCAL", "") = False Then
pstrFailed = pstrFailed & "</p>" & "J:" & "\\Z02RSCVSC04\NOVAShare\MIS\LOCAL Has NOT been mapped"
End If
end if
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "K:\\Z02APPVSC01\PUBARC\"
If fblnMapDriveAndFolder("K:", "\\Z02APPVSC01\PUBARC", "") = False Then
pstrFailed = pstrFailed & "</p>" & "K:" & "\\Z02APPVSC01\PUBARC\ Has NOT been mapped"
End If
if InStr(pstrGroups, "VSC USERS - CIS") then
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "L:\\Z02RSCVSC04\APPLShare\"
If fblnMapDriveAndFolder("L:", "\\Z02RSCVSC04\APPLShare\", "") = False Then
pstrFailed = pstrFailed & "</p>" & "L:" & "\\Z02RSCVSC04\APPLShare\ Has NOT been mapped"
End If
end if
' if InStr(pstrGroups, "VSC C3 Service Accounts") then
' Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "L:\\Z02RSCVSC04\APPLShare\"
' If fblnMapDriveAndFolder("L:", "\\Z02RSCVSC04\APPLShare\", "") = False Then
' pstrFailed = pstrFailed & "</p>" & "L:" & "\\Z02RSCVSC04\APPLShare\ Has NOT been mapped"
' End If
' end if
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "M:" & pcstrC3Server & pstrSpecialVolChar & "IMROOT$\"
If fblnMapDriveAndFolder("M:", pcstrC3Server & pstrSpecialVolChar & "IMROOT$", "") = False Then
pstrFailed = pstrFailed & "</p>" & "M:" & pcstrC3Server & pstrSpecialVolChar & "IMROOT$\ Has NOT been mapped"
End If
'
'Sets up mappings for Supervisory share - \\Z02RSCVSC04\MGMTShare - Added by Rene 12/19/2006
'
if InStr(pstrGroups, "VSC _ADJUDICATIONS_MGMT_ZEN - CIS") then
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "N:\\Z02RSCVSC04\SUPVShare\"
If fblnMapDriveAndFolder("N:", "\\Z02RSCVSC04\SUPVShare", "") = False Then
pstrFailed = pstrFailed & "</p>" & "N:" & "\\Z02RSCVSC04\SUPVShare\ Has NOT been mapped"
End If
end if
if InStr(pstrGroups, "VSC _SIIO_ZEN - CIS") then
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "N:\\Z02RSCVSC04\SUPVShare\"
If fblnMapDriveAndFolder("N:", "\\Z02RSCVSC04\SUPVShare", "") = False Then
pstrFailed = pstrFailed & "</p>" & "N:" & "\\Z02RSCVSC04\SUPVShare\ Has NOT been mapped"
End If
end if
if InStr(pstrGroups, "VSC _N_DRIVE - CIS") then
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "N:\\Z02RSCVSC04\SUPVShare\"
If fblnMapDriveAndFolder("N:", "\\Z02RSCVSC04\SUPVShare", "") = False Then
pstrFailed = pstrFailed & "</p>" & "N:" & "\\Z02RSCVSC04\SUPVShare\ Has NOT been mapped"
End If
end if
'
'End of Supervisory share mappings
'
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping " & "Checking to see if using Citrix"
if fblnCitrix = false then
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Mapping P:\\Z02C4CVSC01\DocProd"
If fblnMapDriveAndFolder("P:", "\\Z02C4CVSC01\DocProd", "") = False Then
pstrFailed = pstrFailed & "</p>" & "P:\\Z02C4CVSC01\DocProd Has NOT been mapped"
End If
end if
Modeless oIE, "VSC Logon Script is running, please wait...</p></p>Setting the PATH variable"
if fblnSetUserEnvVar("PATH",pcstrPath,True) = false then
pstrFailed = pstrFailed & "</p>" & "Could not set the Path environment variable to: " & "</p>" & pcstrPath
end if
if pstrFailed <> "" then
Modeless oIE, " The following Errors Occured:" & pstrFailed
call pause(10) 'pause for 5 seconds
end if
'Close the Splash Screen
oIE.quit