• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 689
  • Last Modified:

VBScript to install Cisco VPN durring SCCM 2007 Task Sequence

I wrote a script to install Cisco VPN durring a SCCM OSD Task Sequence.  The problem with the VPN client is that it needs to be copied locally, which the script should do, but for some reason it isn't working and I can't figure out why to save my life.  Anyone have an idea how to make this work?
Dim oFSO, oOSDEnv, oWSHShell
Dim sOSDSite, sIniLocation, sOSDServer
Dim sInstallPath, sSourcePath, sInstallString

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oOSDEnv = CreateObject("Microsoft.SMS.TSEnvironment")
Set oWSHShell = WScript.CreateObject("WScript.Shell")

sOSDServer = oOSDEnv("_SMSTSMP")
sInstallPath = "C:\Windows\Utils\Cisco"
sSourcePath = "\\" & sOSDServer & "\Cisco_VPN_5.0.0.7_EN.02.PKG\*.*"

If Not oFSO.FolderExists(sInstallPath) Then
   oFSO.CreateFolder(sInstallPath)
End If

If oFSO.FolderExists(sInstallPath) Then
   oFSO.CopyFile sSourcePath, sInstallPath, True
End If

sInstallString = "msiexec /i " & Chr(34) & "C:\Windows\Utils\Cisco\vpnclient_setup.msi" & Chr(34) & " /qn REBOOT=REALLYSUPPRESS"
oWSHShell.Run sInstallString, 1, True

Open in new window

0
JenH2
Asked:
JenH2
  • 2
  • 2
1 Solution
 
merowingerCommented:
1. Have you checked if the files are available in C:\Windows\Utils\Cisco? I think *.* cannot be used in vbscript. Make sure the files are copied successfully.
2. Better way is to create a SCCM Package with all sourcefiles in it. You can then define within SCCM to first download the Sources locally and then execute it.
0
 
JenH2Author Commented:
1. The files aren't there, and as far as I know you can use wildcards in the CopyFile method.
2. It is a package with the files in it, but the task sequence is set to run things from the server, not download everthing locally then run.  That's why I need the script to copy it local.
0
 
merowingerCommented:
So first try executing it manually and check if it works...
0
 
wwwb0n3zcomCommented:
On your advertisement - are you setting it to "Download content from distribution point and run locally"? If you are then you shouldn't need a script to copy it locally as the file will run from the local cache of the workstation.

Screenshots here:
http://www.windows-noob.com/forums/index.php?/topic/499-how-can-i-deploy-an-application-in-sccm-2007-sp1/

-b0n3z
0
 
JenH2Author Commented:
We switched to AnyConnect between this original issue and now and had no problems with it. The CiscoVPN package was scrapped. Thank you all for the suggestions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now