Set objDomain = getObject("LDAP://rootDse")
DomainString = objDomain.Get("dnsHostName")
Sub GrpMeb(UNAME, DomainString)
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UNAME)
For Each GroupObj In UserObj.Groups
Select Case UCase(GroupObj.Name)
Case "Calgary Office"
MapDrive "G:", "\\CGYPDC01\Work_1"
MapDrive "I:", "\\CGYPDC01\Projects"
MapDrive "L:", "\\CGYPDC01\Work_1"
MapDrive "M:", "\\CGYSQL01\Deltek"
Case "Cost_Control"
MapDrive "H:", "\\CGYPDC01\Cost_Ctl"
Case "Map Accounting", "PayrollGroup", "CGYACCTGRP", "Accounting"
MapDrive "N:", "\\CGYPDC01\Acct"
Case "Business Development"
MapDrive "J:", "\\CGYPDC01\Busdev"
Case "Accounting", "Corporate Admin"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G006"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G018"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G046"
Case "2nd Floor"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G038"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G051"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G058"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G059"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G068"
Case "3rd Floor"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G026"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G027"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G037"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G048"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G050"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G056"
Case "4th Floor"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G010"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G011"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G047"
Case "5th Floor"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G033"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G034"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G040"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G045"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G056"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G061"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G064"
Case "Kinetic Colour"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G001"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G054"
Case "Corp Colour"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G066 Colour"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G066 Mono"
Case "4th Floor Color"
WSHNetwork.AddWindowsPrinterConnection "\\CGYPDC01\G065"
Case "PonokaCGYGRP", "EDMCGYGRP", "FtSaskCGYGRP"
MapDrive "G:", "\\CGYPDC01\Work_1"
MapDrive "I:", "\\CGYPDC01\Projects"
MapDrive "L:", "\\CGYPDC01\Work_2"
'********************************************************************************
'Edmonton:
'********************************************************************************
Case "EdmontonGRP"
MapDrive "R:", "\\EDMDC\Projects"
MapDrive "S:", "\\EDMDC\Work_2"
MapDrive "T:", "\\EDMDC\Work_1"
Case "GEN Solutions Projects"
MapDrive "R:", "\\EDMDC\Projects"
'********************************************************************************
'Ponoka:
'********************************************************************************
Case "PonokaGRP", "FtPonokaGRP"
MapDrive "P:", "\\PonokaDC\Projects"
MapDrive "Q:", "\\PonokaDC\General"
WSHNetwork.AddWindowsPrinterConnection "\\PonokaDC\P01"
WSHNetwork.AddWindowsPrinterConnection "\\PonokaDC\mita"
'********************************************************************************
'Fort Saskatchewan
'********************************************************************************
Case "FortGRP", "FtSaskAdmin", "TEMP"
MapDrive "U:", "\\FtSaskDC\Projects"
MapDrive "V:", "\\FtSaskDC\General"
WSHNetwork.AddWindowsPrinterConnection "\\FtSaskDC\KPM01"
WSHNetwork.AddWindowsPrinterConnection "\\FtSaskDC\KPM02"
WSHNetwork.AddWindowsPrinterConnection "\\FtSaskDC\KPM03"
'********************************************************************************
'CAD Installations:
'********************************************************************************
Case "EdmCADGRP", "Drafting Users", "Drafting Leads", "Gem Drafting"
On Error Resume Next
Dim Shell, File, struser, strprog
Set Shell = CreateObject("WScript.Shell")
struser = Shell.ExpandEnvironmentStrings("%appdata%")
strprog = Shell.ExpandEnvironmentStrings("%programfiles%")
Set ofs=WScript.CreateObject("Scripting.FilesystemObject")
Set oFile=ofs.GetFile("C:\program files\autocad 2007\acad.exe")
If Err.Number = 0 Then
Err.Number = 0
Set oFile=ofs.GetFile("c:\program files\gemini\geminiSetup.exe")
If Err.Number = 0 Then
Err.Number = 0
File = """c:\program files\gemini\geminiSetup.exe"""
Shell.Run File
Set oFile=ofs.GetFile(struser & "\gemini\manager.exe")
If Err.Number = 0 Then
Err.Number = 0
File = """" & struser & "\gemini\manager.exe"""
Shell.Run File
End If
Else
Err.Number = 0
MsgBox "AutoCAD Installation found! Setup Program not found" & chr(13) & "Please Contact CAD_Support before running AutoCAD", VBOK
End If
End If
Case Else
End Select
End Sub