| |
linstead
Posts: 23
Score: 0
Joined: 6/30/2005
From:
Status: offline
|
Option Explicit On Error Resume Next <package> <job id="DoneInVBS"> <?job debug="true"?> <script language="VBScript"> Dim Yourname, sDomain, StrPassword Dim Greeting Dim Wshnetwork Dim TryAgain 'Map Network drive also it will not let you map the drive on till you enter a name Set WshNetwork = CreateObject("WScript.Network") Set fso = CreateObject("Scripting.FileSystemObject") sDomain = WshNetwork.UserDomain Do TryAgain = "No" '************************************************************* YourName = InputBox ("What is your Name") StrPassword = InputBox("What is Your Password") If YourName = "" Then Greeting = "I see that you don't what to give me your name" TryAgan = "Yes" MsgBox greeting Else Greeting = "Welcome " & YourName & " Your Drives are Mapped" TryAgain = "No" End If Loop While TryAgain = "Yes" MsgBox Greeting '*************************************************************** MapDrive "R:", "\\**********\apps$" MapDrive "K:", "\\**********\appsQa$" MapDrive "T:", "\\**********\buildqa$" MapDrive "U:", "\\**********\build$" Function MapDrive( letter, UNCname) If fso.DriveExists( letter ) Then WshNetwork.RemoveNetworkDrive letter End If WshNetwork.MapNetworkDrive letter, UNCname End Function '**************************************************************** </Script> </job> </package>
|
|