The below script is used to copy "vpnclient_setup.msi file" from the Source directory to "[ProgramFilesFolder]Cisco Systems\Install\", if the directory exists and if it doesn't exists, this script will create a folder named "Install" and will copy the file. This is achieved by declaring "SOURCEDIR" as a session property and copying from there.
Note: This script should be placed at the end of the "Execute Immediate" sequence for it to work.
*************************************************
Dim objfso,wshshell,str
Set wshshell = createobject("wscript.shell")
PF = wshshell.expandenvironmentstrings("%ProgramFiles%")
str = Session.Property("SOURCEDIR")
If objfso.FolderExists(PF & "\Cisco Systems\Install") Then
objFSO.CopyFile oFile1, PF & "\Cisco Systems\Install\", True
Set objFolder = objFSO.CreateFolder (PF & "\Cisco Systems\Install")
objFSO.CopyFile oFile1, PF & "\Cisco Systems\Install\", True
End If
*************************************************
No comments:
Post a Comment