Cisco VPN

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

This is a silent installer for Cisco Systems VPN Client. Cisco no longer supports this client and most sites will be using the Cisco AnyConnect VPN client.

You need to download your desired version of the Cisco VPN client from the cisco.com website and extract to your WPKG repository. Please note you will need to change the install check and the MSIEXEC uninstall based on the version you are installing. Install on a test computer and search for "Cisco" in HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\.

The client can't be installed from a network share because it drops the network connection, so the installer must be copied to the local disk.

5.0.07.0440

This package deploys vpnclient.ini and a PCF file so that the client will be ready to use immediately.

<?xml version="1.0" encoding="UTF-8"?> 
<packages:packages
        xmlns:packages="http://www.wpkg.org/packages" xmlns:wpkg="http://www.wpkg.org/wpkg" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.wpkg.org/packages ../xsd/packages.xsd" >

  <package 
      id='cisco-vpn' 
      name='Cisco VPN client' 
      revision='%PKG_VERSION%-20150211' 
      priority='10' 
      reboot='false' >
    <!-- <variable name="PKG_VERSION" value="5.0.07.0440" /> -->
    <variable name="PKG_VERSION" value="5.0.7" />
    <variable name="MYPCF" value="mypcf.pcf" />

    <!-- The installer must be copied to the local disk or you'll get 1603 -->

    <check type='uninstall' condition='versiongreaterorequal' path='Cisco Systems VPN Client.*' value='%PKG_VERSION%' />

    <install cmd='"%COMSPEC%" /c robocopy /Z /NP /NDL /NFL /NJH /NJS "%SOFTWARE%\cisco-vpn" "%TEMP%\cisco-vpn"' >
      <exit code="0" />
      <exit code="1" />
      <exit code="2" />
      <exit code="3" />
    </install>

    <install cmd='msiexec /qn /i "%TEMP%\cisco-vpn\32\vpnclient_setup.msi" REBOOT=Suppress' architecture="x86" >
      <exit code="0" />
      <exit code="1638" />
      <exit code="3010" />
    </install>

    <install cmd='msiexec /qn /i "%TEMP%\cisco-vpn\64\vpnclient_setup.msi" REBOOT=Suppress' architecture="x64" >
      <exit code="0" />
      <exit code="1638" />
      <exit code="3010" />
    </install>

    <!-- For mysterious reasons, on 64-bit systems it may still install into %PROGRAMFILES(x86)% -->

    <install cmd='"%COMSPEC%" /c copy /y "%TEMP%\cisco-vpn\%MYPCF%" "%PROGRAMFILES%\Cisco Systems\VPN Client\Profiles\"' >
      <exit code="any" />
    </install>
    <install cmd='"%COMSPEC%" /c copy /y "%TEMP%\cisco-vpn\%MYPCF%" "%PROGRAMFILES(x86)%\Cisco Systems\VPN Client\Profiles\"' architecture="x64" >
      <exit code="any" />
    </install>

    <install cmd='"%COMSPEC%" /c copy /y "%TEMP%\cisco-vpn\vpnclient.ini" "%PROGRAMFILES%\Cisco Systems\VPN Client\vpnclient.ini"' >
      <exit code="any" />
    </install>
    <install cmd='"%COMSPEC%" /c copy /y "%TEMP%\cisco-vpn\vpnclient.ini" "%PROGRAMFILES(x86)%\Cisco Systems\VPN Client\vpnclient.ini"' architecture="x64" >
      <exit code="any" />
    </install>

    <upgrade include="install"/>

    <remove cmd='msiexec /qn /x{1ce60928-8325-49a8-8b06-633e48dd2b67}' >
      <exit code="0" />
      <exit code="1605" />
      <exit code="3010" />
    </remove>

  </package>
</packages:packages>

Suggested vpnclient.ini

Starting the VPN before login is mentioned in the documentation, but it does not work on Windows 7+ because applications can't show dialogs over the login window. After login, users will get an Interactive Services Detection prompt. This INI file locks the RunAtLogin preference so that users won't accidentally turn it on.

[main]
ClientLanguage=
!RunAtLogin=0

If you use the WPKG Client, you can append this to automatically start it when the VPN connects:

[ApplicationLauncher]
Enable=1
Command=C:\Windows\System32\sc.exe start wpkgservice

5.0.04-0300-K9

<package id='ciscovpn' name='Cisco VPN Adapter' revision='50040300' priority='800' reboot='false' >
  <check type='uninstall' condition='exists' path='Cisco Systems VPN Client 5.0.04.0300' />
  <install cmd='xcopy %software%\cisco\vpnclient50040300\*.* %TEMP%\ciscovpn\ /y /i' />
  <install cmd='msiexec /qn /norestart /i "%TEMP%\ciscovpn\vpnclient_setup.msi"' >
    <exit code='194' reboot='true' />
    <exit code='3010' reboot='true' />
  </install>
  <remove cmd='msiexec /q /x{A7091E1D-36A4-47F1-A739-173CC341414F}' >
    <exit code='194' reboot='true' />
    <exit code='3010' reboot='true' />
  </remove>
</package>

Additional Resources