Skip to content

Cisco on Windows ​

The current install path for Cisco Secure Client is:

C:\Program Files (x86)\Cisco\Cisco Secure Client\vpncli.exe

There's no direct Windows equivalent of oathtool, so TOTP codes come from totp-go instead: a small standalone CLI, no Python required.

Prerequisites ​

totp-go on PATH. The installer below fetches it if it's missing. To install it by hand:

powershell
irm https://sh.mawenqian.com/totp-go-install.ps1 | iex

Quick install ​

powershell
irm https://sh.mawenqian.com/cisco-win-install.ps1 | iex

What it does:

  • Drops cisco-vpn.bat and a config.bat template into %USERPROFILE%\.local\opt\cisco-vpn. Override with -InstallDir ....
  • Installs totp-go if it isn't already on PATH.
  • Asks whether to create Connect VPN / Disconnect VPN shortcuts on your Desktop. Say yes and you never have to touch a terminal again.

Re-running the installer later refreshes cisco-vpn.bat without touching your config.bat.

Shortcut icons ​

connect.ico and disconnect.ico from the repo are used by default, one per shortcut.

To use your own, pass -ConnectIconUrl <url> / -DisconnectIconUrl <url> pointing at a .ico file. A shortcut's icon has to be a local .ico / .exe / .dll file (Windows has no notion of a remote icon URL), so a supplied URL is downloaded once into the install folder and pointed at locally.

Manual install ​

  1. Copy Cisco/win/cisco-vpn.bat and Cisco/win/config.bat into the same folder.
  2. Install totp-go: irm https://sh.mawenqian.com/totp-go-install.ps1 | iex
  3. Edit config.bat with your real VPN_HOST, VPN_USER, VPN_PASSWORD and VPN_SECRET, the same variable names as the unix side's config.sh.
  4. Optional: put a shortcut to cisco-vpn.bat on your desktop so you can just double-click to connect.

Usage ​

Double-click cisco-vpn.bat (or run it from a terminal). It will:

  1. Print the current VPN state.
  2. Force-disconnect any existing session.
  3. Load config.bat, generate a fresh TOTP code with totp-go "%VPN_SECRET%", and write a scripted input file to %TEMP%\cisco_input.txt from within the batch script (no helper process involved).
  4. Pipe that file into vpncli.exe -s (scripted mode) to complete the login, then delete the temp file.

One-click disconnect ​

The quick install already creates this shortcut. To make one yourself, use this target:

C:\Windows\System32\cmd.exe /c "C:\Program Files (x86)\Cisco\Cisco Secure Client\vpncli.exe" disconnect & timeout /nobreak /t 3

To change either shortcut's icon later: right-click it → Properties → Change Icon.