As my tagline states, I broke it so you don’t have to.  Recently my Cisco AnyConnect Secure Mobility VPN Client completed an upgrade to the 4.5.00058 version, and after the upgrade any attempt to connect to a VPN would fail with the following error:

Failed to determine valid temporary file folder. Contact your system administrator.

Not the most descriptive of errors.  I tried the simple fixes like removing my preferences .xml and removing any custom profiles, but that didn’t fix it.  I also checked the preferences to see where it was telling Cisco to go for a temp folder, but didn’t find anything pertinent there either.

I resorted to the rip/replace and did a full uninstall, then cleaned all Cisco paths in ProgramData/%AppData%/%LocalAppData%, but the issue persisted even on reinstall of the client after that cleanup.

Since the error did say “temporary file folder”, I went to %temp% and deleted the Cisco directory — an action that requested elevation for some reason.  After deleting the %temp%\Cisco directory, everything worked again.

At some point during the upgrade, the %temp%\Cisco folder was modified so that only elevated processes could successfully read/write — something that broke the AnyConnect VPN client until I resolved it.

Since I googled this error a whole lot and only uncovered a couple of posts referring to an old Mac version of the client, I thought I’d document this in case anyone else had this issue.  It’s a pretty quick fix, all things considered.