Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
On Error Resume Next
Dim strUserName
Dim GroupObj
Dim UserObj
Dim UserGroups
Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")
While strUserName = ""
strUserName = WSHNetwork.UserName
Wend
' maps a letter to hidden share based on user name
WSHNetwork.MapNetworkDrive "U:", "\\RUBY\" + strUserName + "$"
'*****************************************************************
'************* Map drive for DATA Directory ********************
'*****************************************************************
WSHNetwork.MapNetworkDrive "N:", "\\RUBY\DATA"
'*****************************************************************
'************* Map drive for Specific Groups! *****************
'*****************************************************************
'Get User Object
Set UserObj = GetObject("WinNT://FillInYourDomainName/" & strUserName)
UserGroups=""
For Each GroupObj In UserObj.Groups
UserGroups=UserGroups & "[" & GroupObj.Name & "]"
Next
UserGroups = Ucase(UserGroups)
'************* Map J: drive for ECS members OR Shams users *****************
'Check if member of group
Select Case true
case InStr(UserGroups,"[" & "ECS" & "]") > 0
WSHNetwork.MapNetworkDrive "J:", "\\RUBY\Applications"
case InStr(UserGroups,"[" & "TRANSCRIPTION" & "]") > 0
WSHNetwork.MapNetworkDrive "J:", "\\ONYX\Shams"
End Select
WSHNetwork.RemoveNetworkDrive "j:" ' will remove mapped drive
'etc etc
Dim fso
Dim source
Dim destination
Dim overwrite
Dim force
Set fso = CreateObject("Scripting.FileSystemObject")
source = "c:\test"
' with UNC
destination = "\\NetworkServerName\sharename\pathname"
' or with drive mapped to \\NetworkServerName\sharename
destination = "J:\pathname"
overwrite = True
force = True
If fso.FolderExists(destination) Then
fso.DeleteFolder destination, force
End If
fso.CopyFolder source, destination, overwrite