VBScript to install Cisco VPN durring SCCM 2007 Task Sequence

Posted on 2011-05-11
Last Modified: 2014-01-12
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
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

Question by:JenH2
    LVL 31

    Expert Comment

    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.
    LVL 2

    Author Comment

    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.
    LVL 31

    Expert Comment

    So first try executing it manually and check if it works...
    LVL 3

    Expert Comment

    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:

    LVL 2

    Accepted Solution

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This is an addendum to the following article: Acitve Directory based Outlook Signature ( The script is fine, and works in normal client-server domains…
    Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
    This video discusses moving either the default database or any database to a new volume.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now