biglebowski
Technical User
I have a script I want to use to automate the setup of an app. It will map a drive to my server and copy 2 files to the correct folders on the users local machine. I have only been able to set it ot take a specific drive letter (Z) is there a way it can check for a drive letter that is not being used and allocate that. Here is what I have so far
Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile
strDriveLetter = "z:"
strRemotePath = "\\mann-etfms\c$"
strUser = "MNsecurel0gix"
strPassword = "LOG587ix??"
strProfile = "false"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _
strProfile, strUser, strPassword
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFolder "Z:\ETM server files\esc_client", "C:\Program Files\SecureLogix\ETM\",TRUE
fso.CopyFile "Z:\ETM server files\hosts", "C:\WINDOWS\system32\drivers\etc\",TRUE
objNetwork.RemoveNetworkDrive "Z:"
WScript.Echo "Server connection has been configured"
WScript.Quit
That rug really tied the room together, did it not?
Dim strDriveLetter, strRemotePath, strUser, strPassword, strProfile
strDriveLetter = "z:"
strRemotePath = "\\mann-etfms\c$"
strUser = "MNsecurel0gix"
strPassword = "LOG587ix??"
strProfile = "false"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, _
strProfile, strUser, strPassword
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFolder "Z:\ETM server files\esc_client", "C:\Program Files\SecureLogix\ETM\",TRUE
fso.CopyFile "Z:\ETM server files\hosts", "C:\WINDOWS\system32\drivers\etc\",TRUE
objNetwork.RemoveNetworkDrive "Z:"
WScript.Echo "Server connection has been configured"
WScript.Quit
That rug really tied the room together, did it not?